【问题标题】:Is it possible to use the martini framework on app engine是否可以在应用引擎上使用马提尼框架
【发布时间】:2013-11-28 14:16:51
【问题描述】:

是否可以在 Google 的应用引擎上使用http://martini.codegangsta.io?有人有例子吗?在走这条路之前,我应该注意什么问题?提前致谢。

【问题讨论】:

标签: google-app-engine go


【解决方案1】:

只要马提尼不使用 cgo 或 unsafesyscallit should be fineREADME of martini 包含一个使用带有 GAE 的马提尼的示例 @elithar pointed out

package hello

import (
  "net/http"
  "github.com/go-martini/martini"
)

func init() {
  m := martini.Classic()
  m.Get("/", func() string {
    return "Hello world!"
  })
  http.Handle("/", m)
}

在应用引擎中使用第三方包的另一个例子是this randomly chosen app engine example project

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-04-04
    • 1970-01-01
    • 2016-04-23
    • 2013-01-13
    • 1970-01-01
    • 2013-02-11
    • 2012-04-11
    • 1970-01-01
    相关资源
    最近更新 更多