mirror of
https://github.com/writeas/htmlhouse
synced 2025-07-18 21:08:16 +00:00
20 lines
272 B
Go
20 lines
272 B
Go
package htmlhouse
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/codegangsta/negroni"
|
|
"log"
|
|
)
|
|
|
|
func Serve() {
|
|
app, err := newApp()
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
defer app.close()
|
|
|
|
n := negroni.Classic()
|
|
n.UseHandler(app.router)
|
|
n.Run(fmt.Sprintf(":%d", app.cfg.ServerPort))
|
|
}
|