update
This commit is contained in:
@@ -15,20 +15,4 @@ func LoadRoutes(app *fiber.App) {
|
||||
// Rutas del backend (web)
|
||||
WebRoutes(web)
|
||||
|
||||
vue := app.Group("")
|
||||
// Sirve archivos estáticos de Vue.js desde la carpeta 'dist'
|
||||
vue.Static("/", "./dist") // Sirve archivos estáticos de Vue.js
|
||||
|
||||
// Ruta para acceder a los archivos subidos
|
||||
vue.Get("/uploads/:filename", func(c *fiber.Ctx) error {
|
||||
filename := c.Params("filename")
|
||||
// Devuelve el archivo solicitado desde 'uploads'
|
||||
return c.SendFile("./uploads/" + filename)
|
||||
})
|
||||
|
||||
// Ruta wildcard para manejar las rutas del frontend (SPA)
|
||||
vue.Get("/*", func(c *fiber.Ctx) error {
|
||||
return c.SendFile("./dist/index.html")
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user