add vue-mongotest vue js app component

This commit is contained in:
2021-07-04 22:59:11 +01:00
parent 37aa699eb9
commit c2dfe291c2
13 changed files with 29827 additions and 6 deletions
+8 -3
View File
@@ -61,11 +61,16 @@ func main() {
}
return c.JSON(testitems)
})
app.Static("/", "dist")
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("<!DOCTYPE html><html><head><meta charset=\"utf-8\"><title>Mongo Test</title></head><body><h1>Hello, World 👋!\n</h1><p><a href=\"/atest\">atest records</a></p></body></html>")
app.Get("/*", func(ctx *fiber.Ctx) error {
return ctx.SendFile("./dist/index.html")
})
// app.Get("/", func(c *fiber.Ctx) error {
// return c.SendFile("<!DOCTYPE html><html><head><meta charset=\"utf-8\"><title>Mongo Test</title></head><body><h1>Hello, World 👋!\n</h1><p><a href=\"/atest\">atest records</a></p></body></html>")
// })
log.Fatal(app.Listen(":3000"))
}