Serving static files on a url with parameters in Express Serving static files on a url with parameters in Express express express

Serving static files on a url with parameters in Express


It sounds like you're not using absolute URL's (starting with a /) for the static resources in your template, so they are being requested relative to /projects/batteryapp instead of the root.

So instead of something like this:

<script src="js/app.js"></script>

Use this:

<script src="/js/app.js"></script>