Skip to content

Serving a next.js app from a subroute #1482

@robstolarz

Description

@robstolarz

I want to serve a next.js app from inside a node module, to be included as an Express route in a larger application. I can route requests to the next app pretty easily, and server-side rendering works well. However, it gets the links wrong (e.g. linking to /about rather than /<subdir>/about) and the /_next folder is not routed properly which messes up the app.

How would I go about serving a next.js app from a subroute?

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