Example #1
0
func (m MashupModule) Start(config conf.ConfigFile) error {
	// TODO check for DB, etc...
	controller := mashup.OtterAPIController{}
	// bind the controller
	goweb.MapRest("/otter", controller)
	return nil
}
Example #2
0
func main() {
	controller := new(MyController)
	goweb.MapRest("/api", controller)
	goweb.ListenAndServe(":8080")
}
Example #3
0
func Init(db *mgo.Database) {
	log.Println("Initializing article package")
	controller := NewController(db)
	goweb.MapRest("/articles", controller)
}