Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to set BaseURL on call to next() #2452

Closed
1 task done
rgbkrk opened this issue Jul 3, 2017 · 3 comments
Closed
1 task done

Ability to set BaseURL on call to next() #2452

rgbkrk opened this issue Jul 3, 2017 · 3 comments

Comments

@rgbkrk
Copy link
Contributor

rgbkrk commented Jul 3, 2017

I'd like to be able to host a next.js app on it's own base path (e.g. /some/base/path/ - on a configurable http proxy). This is primarily for use with JupyterHub to run as a separate service (on e.g. /services/nextApp). I've gotten everything to work for the express app (that uses next handlers underneath) as well as the frontend's handling of the paths (the req.params -> query -> page/component are awesome with next.js).

The only issue I'm running into is that _next is assumed to be at the absolute path of /_next when it needs to be able to be served at /some/base/path/_next.

const app = next({ dev, baseURL: '/asdf' });
  • I have searched the issues of this repository and believe that this is not a duplicate.
@timneutkens
Copy link
Member

Duplicate of #257

@rgbkrk
Copy link
Contributor Author

rgbkrk commented Jul 5, 2017

Sure enough, thanks.

@timneutkens
Copy link
Member

🙌 there's some solutions in that thread :)

@lock lock bot locked as resolved and limited conversation to collaborators May 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants