go-server.main.mustache Maven / Gradle / Ivy
{{>partial_header}}
package main
import (
"log"
"net/http"
{{packageName}} "{{gitHost}}/{{gitUserId}}/{{gitRepoId}}/{{sourceFolder}}"
)
func main() {
log.Printf("Server started")
{{#apiInfo}}{{#apis}}
{{classname}}Service := {{packageName}}.New{{classname}}Service()
{{classname}}Controller := {{packageName}}.New{{classname}}Controller({{classname}}Service)
{{/apis}}{{/apiInfo}}
router := {{packageName}}.NewRouter({{#apiInfo}}{{#apis}}{{classname}}Controller{{^-last}}, {{/-last}}{{/apis}}{{/apiInfo}})
log.Fatal(http.ListenAndServe(":{{serverPort}}", router))
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy