|
@@ -9,10 +9,10 @@ import (
|
|
"os/signal"
|
|
"os/signal"
|
|
"time"
|
|
"time"
|
|
|
|
|
|
- "code.osinet.fr/fgm/kurz/web"
|
|
|
|
|
|
+ "code.osinet.fr/fgm/kurz/web/ui"
|
|
"github.com/spf13/viper"
|
|
"github.com/spf13/viper"
|
|
|
|
|
|
- "code.osinet.fr/fgm/kurz/api"
|
|
|
|
|
|
+ "code.osinet.fr/fgm/kurz/web/api"
|
|
"code.osinet.fr/fgm/kurz/domain"
|
|
"code.osinet.fr/fgm/kurz/domain"
|
|
"code.osinet.fr/fgm/kurz/infrastructure"
|
|
"code.osinet.fr/fgm/kurz/infrastructure"
|
|
"github.com/gorilla/mux"
|
|
"github.com/gorilla/mux"
|
|
@@ -76,12 +76,12 @@ func serveHandler(_ *cobra.Command, args []string) {
|
|
viper.SetDefault("web.assetsPath", "web/public")
|
|
viper.SetDefault("web.assetsPath", "web/public")
|
|
assetsPath := viper.Get("web.assetsPath").(string)
|
|
assetsPath := viper.Get("web.assetsPath").(string)
|
|
webConfig := viper.Get("web").(map[string]interface{})
|
|
webConfig := viper.Get("web").(map[string]interface{})
|
|
- web.SetupGlobals(webConfig)
|
|
|
|
|
|
+ ui.SetupGlobals(webConfig)
|
|
|
|
|
|
// Set up Web API and UI routes.
|
|
// Set up Web API and UI routes.
|
|
router := mux.NewRouter()
|
|
router := mux.NewRouter()
|
|
api.SetupRoutes(router)
|
|
api.SetupRoutes(router)
|
|
- web.SetupUI(router, assetsPath)
|
|
|
|
|
|
+ ui.SetupUI(router, assetsPath)
|
|
http.Handle("/", router)
|
|
http.Handle("/", router)
|
|
|
|
|
|
// Start a server that can handle a SIGINT to shutdown.
|
|
// Start a server that can handle a SIGINT to shutdown.
|