node.js - Serving Angular2 app at a base URL with Express -


i have angular2 app , running , simple express server. possible serve application when user visits '/app' (for example)? if yes how can implemented?

i intend have multiple angular apps on different urls , of these need scripts. hence solution takes care of script handle when desired.


edit- along accepted answer, if using angular-cli, 'base-href' has set url of app when building app.

yes, that's possible.

you have define endpoint one:

app.get('/app', function (req, res) {   res.send(/* application */) }) 

Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -