diff --git a/go.mod b/go.mod new file mode 100644 index 0000000000000000000000000000000000000000..2370243776ebd987d13ac852fff3edcf1469c800 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module forge.grandlyon.com/web-et-numerique/llle_project/backoffice-server + +go 1.15 diff --git a/internal/rootmux/rootmux.go b/internal/rootmux/rootmux.go new file mode 100644 index 0000000000000000000000000000000000000000..0691a5790b5770d897ec29f3b098f3c593ded02e --- /dev/null +++ b/internal/rootmux/rootmux.go @@ -0,0 +1,11 @@ +package rootmux + +import ( + "net/http" +) + +func CreateRootMux(staticDir string) http.Handler { + mainMux := http.NewServeMux() + + return mainMux +} diff --git a/main.go b/main.go new file mode 100644 index 0000000000000000000000000000000000000000..75917cc867b3bbe71f4fac72590be2bbe4e2a329 --- /dev/null +++ b/main.go @@ -0,0 +1,16 @@ +package main + +import ( + "log" + "net/http" + + "forge.grandlyon.com/web-et-numerique/llle_project/backoffice-server/internal/rootmux" +) + +func main() { + log.Println("--- Server is starting ---") + + // Create main server + mainMux := rootmux.CreateRootMux("web") + http.ListenAndServe(":8080", mainMux) +}