Skip to content

🤔 How to serve Single page application #249

@WLun001

Description

@WLun001

Question description
How to serve javascript single app application?

Code snippet (optional)

package main

import "github.com/gofiber/fiber"

func main() {
  app := fiber.New()
  // ..
app.Static("/", "web/dist/web")
}

This only works for the client root routes. It won't work if the client has navigate to different route.
eg, /page1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions