HotTowel-Angular
HotTowel-Angular copied to clipboard
base url for app
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
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