mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-10-23 00:12:03 +00:00
16
api/main.go
16
api/main.go
@@ -2,32 +2,32 @@ package main
|
||||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"mizuserver/pkg/inserter"
|
||||
"mizuserver/pkg/middleware"
|
||||
"mizuserver/pkg/routes"
|
||||
"mizuserver/pkg/utils"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// TODO: to generate data
|
||||
//path := "/Users/roeegadot/Downloads/output2"
|
||||
//api.TestHarSavingFromFolder(path)
|
||||
|
||||
// TODO: disabling this line for now (this should be as part of the MAIN
|
||||
// go inserter.StartReadingFiles("/var/up9hars")
|
||||
|
||||
func main() {
|
||||
|
||||
app := fiber.New()
|
||||
|
||||
go inserter.StartReadingFiles("/tmp/up9hars") // process to read files and insert to DB
|
||||
|
||||
middleware.FiberMiddleware(app) // Register Fiber's middleware for app.
|
||||
|
||||
app.Static("/", "./site")
|
||||
|
||||
// Simple route to know server is running
|
||||
//Simple route to know server is running
|
||||
app.Get("/echo", func(c *fiber.Ctx) error {
|
||||
return c.SendString("Hello, World 👋!")
|
||||
})
|
||||
|
||||
routes.WebSocketRoutes(app)
|
||||
routes.EntriesRoutes(app)
|
||||
routes.NotFoundRoute(app)
|
||||
|
||||
utils.StartServer(app)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user