add vue-mongotest vue js app component
This commit is contained in:
@@ -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"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user