This repository has been archived on 2022-11-30. You can view files and clone it, but cannot push or open issues or pull requests.
tacitus/cmd/webapp/main.go

28 lines
471 B
Go
Raw Normal View History

2017-09-09 10:15:07 -07:00
package main
import (
2017-09-10 13:09:27 -07:00
"github.com/kcotugno/tacitus/http"
"github.com/kcotugno/tacitus/osutil"
2017-09-24 22:23:13 -07:00
"github.com/kcotugno/tacitus/postgres"
"log"
2017-09-09 10:15:07 -07:00
)
func main() {
2017-09-10 13:04:02 -07:00
logger := osutil.NewLogger()
logger.Utc = true
2017-09-09 10:15:07 -07:00
s := http.NewServer()
db := postgres.NewClient()
db.Name = "gdax"
db.User = "gdax"
2017-09-10 13:04:02 -07:00
db.SetLogger(logger)
2017-09-09 10:15:07 -07:00
if err := db.Open(); err != nil {
log.Panic(err)
}
s.Handler.TradeHandler.TradeService = db.TradeService()
defer s.Close()
s.Open()
2017-09-24 22:23:13 -07:00
<-s.Err
2017-09-09 10:15:07 -07:00
}