add example for api application

This commit is contained in:
astaxie
2013-07-09 13:59:47 +08:00
parent 7bfb4126d7
commit fece5adc2a
4 changed files with 136 additions and 0 deletions

20
example/beeapi/main.go Normal file
View File

@@ -0,0 +1,20 @@
package main
import (
"github.com/astaxie/beego"
"github.com/astaxie/beego/example/beeapi/controllers"
)
// Objects
// URL HTTP Verb Functionality
// /object POST Creating Objects
// /object/<objectId> GET Retrieving Objects
// /object/<objectId> PUT Updating Objects
// /object GET Queries
// /object/<objectId> DELETE Deleting Objects
func main() {
beego.RESTRouter("/object", &controllers.ObejctController{})
beego.Run()
}