1 Star 0 Fork 0

ifa6 / fresh

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
main.go 433 Bytes
一键复制 编辑 原始数据 按行查看 历史
Andrea Franz 提交于 2014-01-15 14:24 . initial import
package main
import (
"github.com/codegangsta/martini"
"github.com/pilu/fresh/runner/runnerutils"
"net/http"
"os"
)
func runnerMiddleware(w http.ResponseWriter, r *http.Request) {
if runnerutils.HasErrors() {
runnerutils.RenderError(w)
}
}
func main() {
m := martini.Classic()
if os.Getenv("DEV_RUNNER") == "1" {
m.Use(runnerMiddleware)
}
m.Get("/", func() string {
return "Hello world - Martini"
})
m.Run()
}
Go
1
https://gitee.com/ifa6/fresh.git
git@gitee.com:ifa6/fresh.git
ifa6
fresh
fresh
0fa698148017

搜索帮助