0👍
You can mount your entire app on that prefix with the statement
express().use("/prefix", app).listen(4242);
The prefix
only appears in this statement, nowhere in the Javascript code for the app. But if the app needs to know it, it can use app.mountpath
.
Source:stackexchange.com