update: better CSS border colors
This commit is contained in:
62
main.go
62
main.go
@ -1,7 +1,7 @@
|
||||
/*
|
||||
|
||||
* security | MatterLinux Package Security Tracker
|
||||
* MatterLinux 2023-2024 (https://matterlinux.xyz)
|
||||
* security | MatterLinux Package Security Tracker
|
||||
* MatterLinux 2023-2024 (https://matterlinux.xyz)
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -16,7 +16,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
@ -30,39 +30,39 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
log.SetFlags(log.Lshortfile | log.Ltime)
|
||||
log.SetFlags(log.Lshortfile | log.Ltime)
|
||||
|
||||
engine := html.New("./templates", ".html")
|
||||
app := fiber.New(fiber.Config{
|
||||
DisableStartupMessage: true,
|
||||
Views: engine,
|
||||
})
|
||||
engine := html.New("./templates", ".html")
|
||||
app := fiber.New(fiber.Config{
|
||||
DisableStartupMessage: true,
|
||||
Views: engine,
|
||||
})
|
||||
|
||||
err := lib.LoadDatabase()
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to load database: %s", err.Error())
|
||||
}
|
||||
err := lib.LoadDatabase()
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to load database: %s", err.Error())
|
||||
}
|
||||
|
||||
app.Static("/", "./public")
|
||||
app.Get("/", routes.GETIndex)
|
||||
app.Get("/details/:id", routes.GETDetails)
|
||||
app.Static("/", "./public")
|
||||
app.Get("/", routes.GETIndex)
|
||||
app.Get("/details/:id", routes.GETDetails)
|
||||
|
||||
app.Get("/login", routes.GETLogin)
|
||||
app.Post("/login", routes.POSTLogin)
|
||||
app.Get("/login", routes.GETLogin)
|
||||
app.Post("/login", routes.POSTLogin)
|
||||
|
||||
app.Use("/manage", routes.MiddleAuth)
|
||||
app.Get("/manage", routes.GETManage)
|
||||
app.Get("/manage/logout", routes.GETLogout)
|
||||
app.Post("/manage/new", routes.POSTNew)
|
||||
app.Post("/manage/status", routes.POSTStatus)
|
||||
app.Use("/manage", routes.MiddleAuth)
|
||||
app.Get("/manage", routes.GETManage)
|
||||
app.Get("/manage/logout", routes.GETLogout)
|
||||
app.Post("/manage/new", routes.POSTNew)
|
||||
app.Post("/manage/status", routes.POSTStatus)
|
||||
|
||||
app.Get("*", func(c *fiber.Ctx) error {
|
||||
return lib.RenderError(c, 404)
|
||||
})
|
||||
app.Get("*", func(c *fiber.Ctx) error {
|
||||
return lib.RenderError(c, 404)
|
||||
})
|
||||
|
||||
log.Printf("Starting MatterLinux Security Tracker on port 9876")
|
||||
err = app.Listen(":9876")
|
||||
if err != nil {
|
||||
log.Fatalf("Error starting server: %s", err)
|
||||
}
|
||||
log.Printf("Starting MatterLinux Security Tracker on port 9876")
|
||||
err = app.Listen(":9876")
|
||||
if err != nil {
|
||||
log.Fatalf("Error starting server: %s", err)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user