From 7f9d1fb3a2177f06ee676f0f3a12bec909684e26 Mon Sep 17 00:00:00 2001 From: Alex Che Date: Tue, 27 Jan 2015 04:15:56 +0200 Subject: [PATCH] Code tags added to "Project routing setting" --- en-US/quickstart/router.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/en-US/quickstart/router.md b/en-US/quickstart/router.md index e81f5d00..dd4c5e85 100755 --- a/en-US/quickstart/router.md +++ b/en-US/quickstart/router.md @@ -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 ( @@ -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: