1
0

Better config handling with constants (#83)

This commit is contained in:
konrad
2019-07-06 20:12:26 +00:00
committed by Gitea
parent f1d21ea52b
commit 1f1a079fd3
17 changed files with 200 additions and 120 deletions

View File

@ -17,13 +17,13 @@
package cmd
import (
"code.vikunja.io/api/pkg/config"
"code.vikunja.io/api/pkg/log"
"code.vikunja.io/api/pkg/routes"
"code.vikunja.io/api/pkg/swagger"
"context"
"fmt"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"os"
"os/signal"
"time"
@ -49,7 +49,7 @@ var webCmd = &cobra.Command{
routes.RegisterRoutes(e)
// Start server
go func() {
if err := e.Start(viper.GetString("service.interface")); err != nil {
if err := e.Start(config.ServiceInterface.GetString()); err != nil {
e.Logger.Info("shutting down...")
}
}()