You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to set a base url (a bit like a java context) for the app? i tried the usual approaches, configuring the app with use(), making the main app a sub-app of a parent app, using express().Router, to no avail. If you have any suggestions or even better a ready-made approach, that would be great.
Basically I'd like to run the entire app at http://localhost:3333/foo
The text was updated successfully, but these errors were encountered:
Can you try: app.use('/foo', express.static('./src/client/'), app.use('/foo/*', express.static('./src/client/index.html')) and set the base URL in index.html: <base href="/foo/">
Hi ,
I tried the above suggestion its not working for me. I made the changes in app.js
as follows,
app.js app.use('/foo',express.static('./src/client/')); app.use('/foo/*', express.static('./src/client/index.html'));
in index..html <base href="/foo/">
still not app not able to find resource files . Please help thanks in advance
Is it possible to set a base url (a bit like a java context) for the app? i tried the usual approaches, configuring the app with
use()
, making the main app a sub-app of a parent app, usingexpress().Router
, to no avail. If you have any suggestions or even better a ready-made approach, that would be great.Basically I'd like to run the entire app at
http://localhost:3333/foo
The text was updated successfully, but these errors were encountered: