Allow deploying commuter on a basepath
In order to deploy commuter as a service for JupyterHub (and generally on the configurable HTTP proxy), we need the ability to run commuter on a prefix.
/cc @minrk @cabhishek
Originally reported on #94, silly me.
~~Working on this today in hopes we can deploy it with JupyterHub this week.~~ Didn't happen, probably won't work on this again.
Hello, just curious about this (and #94). Support for configuring the root path/prefix would enable a number of different deployment options.
@rgbkrk I'm just looking at this now. I'm wondering how you were imagining it being implemented?
It appears there is an Express backend app, hosting a Next frontend app.
I've tried the obvious:
const baseURI = process.env.COMMUTER_SOMEVAR || '/';
app.use(baseURI, router);
and it isn't working. That's typically that all that would be required in Express.
Where are the complications in implementing this and where should I start looking?
There is experimental support now in Next for a configurable basePath, which allows the frontend to be dynamically aware of it's mount point.
That configurable basePath is probably the right starting point, but I haven't touched this code base or next for a long time. 😅
Thanks @rgbkrk
I'll have to look into it a bit more. Migrating commuter from express to next might take a bit of work.