Some tests
[VSCPweb/.git] / vscpweb.go
index 69dc1d10d10a46867f4495dfe3bd2d54fbd998d7..23a07ab6cd6a8b914d258254b17eb393485ceafa 100644 (file)
@@ -1,22 +1,23 @@
 // This is a system for playing with SDN based openvswitches using a simple web
 // interface. This project will be combined with a CLI version or probably just
 // made compatible with a core version in the future.
-package vscpweb
+package main
 
 import (
        "fmt"
        "net/http"
 
        hh "healthHandlers"
+       //mh "managementHandlers"
+       //vh "virtualAPIHandlers"
+       //ch "controllerHandlers"
+       //sh "staticHandlers"
 
        "github.com/go-chi/chi/v5"
        "github.com/go-chi/chi/v5/middleware"
 )
 
-// mh "managementHandlers"
-// sh "staticHandlers"
-// vh "virtualAPIHandlers"
-// ch "controllerHandlers"
+
 func main() {
        //create a new server and mount the handlers:
        s := CreateNewServer()
@@ -91,6 +92,7 @@ func (s *server) MountHandlers() {
        //healthRouter.Get("/", )//this renders the health page "/health"
        //healthRouter.Get("/ping", )// "/rpiping"
        healthRouter.Get("/masterHealth", hh.MasterHealthHandler) //return a JSON with healt of the master "/free"
+       healthRouter.Get("/", hh.MasterHealthHandler) //return a JSON with healt of the master "/free"
        //controllerRouter.Delete("/flow", )//this is an external request "/flowdel"
        //controllerRouter.Get("/resetflows", )//not sure if here or managementRouter
        //controllerRouter.Get("/listswitch", )