Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
func main() {
database.DB = database.Init()
defer database.DB.Close()
out, err := os.OpenFile("./goblog.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)
if err != nil {
panic(err)
}
defer out.Close()
router.Logger = out
srv := router.NewServer()
router.RegisterRoutes(srv)
srv.Run("127.0.0.1:8000")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.