Proyectos
Ver en GitHub 
710leo/toruk
Acerca de
Go web 开发脚手架
Desarrollo web y de aplicacionesCrecimiento de estrellas medido
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Recopilando historial
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
OriginalToruk
go web 开发脚手架
主要由下面几个第三方库集成,简单、灵活,可以快速开发web项目
- 路由:github.com/gorilla/mux
- 渲染模板:github.com/unrolled/render
- Cookie封装:github.com/gorilla/securecookie
- 中间件:github.com/codegangsta/negroni
- 上下文传输:github.com/gorilla/context
文件结构

使用方法
通过修改http/ruote.go 将数据传到对应的handler中,然后在通过render将数据返回回去。 ruote.go
func configConfRoutes(r *mux.Router) {
r.HandleFunc("/home", handler.HomeIndex).Methods("GET")
}
handler.go
func HomeIndex(w http.ResponseWriter, r *http.Request) {
render.HTML(r, w, "home/index")
}
初始化
# set $GOPATH and $GOROOT
# 比如你的项目名称叫做 awosome
cd $GOPATH/src
git clone https://github.com/710leo/Toruk.git
mv Toruk awosome
cd awosome
./init awosome
go get ./...
编译&运行
./control build
./control start
答疑
交流QQ群:173502733
Explorar proyectos relacionados
Cargando…