You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

37 lines
646 B

package main
import (
"sig-pub/internal/sig"
"sig-pub/pkg/config"
"sig-pub/pkg/storage/persist"
"sig-pub/pkg/utils/exit"
)
// curl server: /api/sig/backtest/log
func main() {
// load config
conf := config.MustLoadConfig(new(config.Configuration), "config/config.toml")
// database
db, err := conf.Database.Postgres.NewGormDB()
if err != nil {
panic(err)
}
rdb := persist.NewDB(db)
if err := rdb.Init(); err != nil {
panic(err)
}
sigServer := sig.NewSigServer(rdb)
if err = sigServer.Init(); err != nil {
panic(err)
}
go func() {
if err := sigServer.Run(":7009"); err != nil {
panic(err)
}
}()
exit.Await()
}