mirror of
https://github.com/pushbits/server.git
synced 2025-06-16 01:21:59 +02:00
Add configuration for HTTP and debug mode
This commit is contained in:
parent
ba0306f384
commit
354ce0c08d
4 changed files with 22 additions and 5 deletions
9
app.go
9
app.go
|
@ -31,6 +31,10 @@ func main() {
|
|||
|
||||
c := configuration.Get()
|
||||
|
||||
if c.Debug {
|
||||
log.Printf("%+v\n", c)
|
||||
}
|
||||
|
||||
cm := credentials.CreateManager(c.Crypto)
|
||||
|
||||
db, err := database.Create(cm, c.Database.Dialect, c.Database.Connection)
|
||||
|
@ -51,6 +55,7 @@ func main() {
|
|||
|
||||
setupCleanup(db, dp)
|
||||
|
||||
engine := router.Create(db, dp)
|
||||
runner.Run(engine)
|
||||
engine := router.Create(c.Debug, db, dp)
|
||||
|
||||
runner.Run(engine, c.HTTP.ListenAddress, c.HTTP.Port)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue