remove unnecessary config

This commit is contained in:
Pedro Nasser
2016-08-26 23:04:12 -03:00
parent ae2b12034d
commit 609d767c3f
4 changed files with 8 additions and 17 deletions

View File

@@ -4,7 +4,6 @@ import (
log "github.com/Sirupsen/logrus"
"github.com/iron-io/functions/api/config"
"github.com/iron-io/functions/api/datastore"
"github.com/iron-io/functions/api/models"
"github.com/iron-io/functions/api/runner"
"github.com/iron-io/functions/api/server"
"github.com/spf13/viper"
@@ -13,15 +12,9 @@ import (
func main() {
ctx := context.Background()
c := &models.Config{}
config.InitConfig()
err := c.Validate()
if err != nil {
log.WithError(err).Fatalln("Invalid config.")
}
ds, err := datastore.New(viper.GetString("DB"))
if err != nil {
log.WithError(err).Fatalln("Invalid DB url.")
@@ -32,6 +25,6 @@ func main() {
log.WithError(err).Fatalln("Failed to create a runner")
}
srv := server.New(c, ds, runner)
srv := server.New(ds, runner)
srv.Run(ctx)
}