Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code tags added to "Project routing setting" #1

Merged
merged 1 commit into from
Jan 27, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions en-US/quickstart/router.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sort: 2
# Project routing setting

So, we've created a beego project and ran it in previous section. But how does it work? Let's investigate from the starting file (main.go).

``` go
package main

import (
Expand All @@ -17,7 +17,7 @@ So, we've created a beego project and ran it in previous section. But how does i
func main() {
beego.Run()
}

```
We can see two simple lines. The first one registers the router by calling `beego.Router` and the second one is `beego.Run`. What did these two lines do?

1. Actually beego.Router registered an address. The first argument is the request uri and here is `/` which means the request doesn't have any uri. The second argument is the Controller who will handle the requests for this uri. We can also register a router like this:
Expand Down