mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-11 02:12:53 +00:00
24 lines
353 B
Go
24 lines
353 B
Go
package main
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"mywebsite/server/controller/api"
|
|
"mywebsite/server/db"
|
|
"mywebsite/server/route"
|
|
"mywebsite/server/utils"
|
|
)
|
|
|
|
func init() {
|
|
configurations := utils.ReadConfig()
|
|
|
|
db.Configure(configurations.Database)
|
|
api.Configure(configurations.Api)
|
|
|
|
db.Mongo.Connect()
|
|
|
|
router := route.Routes()
|
|
|
|
http.Handle("/", router)
|
|
}
|