Initial commit still with some hardcoded things

This commit is contained in:
2025-09-16 22:57:21 +01:00
commit b578976dad
14 changed files with 722 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
package cmd
import (
"log"
api "github.com/ESilva15/PTInvCertSWDB/api"
"github.com/spf13/cobra"
)
func restServer(cmd *cobra.Command, args []string) {
// TODO - We need to load the data somehow to return it
err := api.RunServer()
if err != nil {
log.Fatal("Failed to run HTTP server:", err)
}
}
// shelf
var restServerCMD = &cobra.Command{
Use: "http",
Short: "",
Long: ``,
Args: nil,
Run: restServer,
}
func init() {
rootCmd.AddCommand(restServerCMD)
}