28 lines
472 B
Go
28 lines
472 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"github.com/kcotugno/tacitus/http"
|
|
"github.com/kcotugno/tacitus/postgres"
|
|
"github.com/kcotugno/tacitus/osutil"
|
|
)
|
|
|
|
func main() {
|
|
logger := osutil.NewLogger()
|
|
logger.Utc = true
|
|
s := http.NewServer()
|
|
db := postgres.NewClient()
|
|
db.Name = "gdax"
|
|
db.User = "gdax"
|
|
db.SetLogger(logger)
|
|
if err := db.Open(); err != nil {
|
|
log.Panic(err)
|
|
}
|
|
|
|
s.Handler.TradeHandler.TradeService = db.TradeService()
|
|
defer s.Close()
|
|
|
|
s.Open()
|
|
<- s.Err
|
|
}
|