Node.js / Expess.js. Static router not recognized if used with wildcard router Node.js / Expess.js. Static router not recognized if used with wildcard router express express

Node.js / Expess.js. Static router not recognized if used with wildcard router


There is nothing wrong with your code but keep in mind that any request on something that doesn't exist will be catch by your get('/*', ...).

This said, you load public_dir on /public that's mean if public_dir is defined as public/website/ you have to do http://127.0.0.1:3000/public/application.js in order to access a file locate at /public/website/application.js