Answer the question
In order to leave comments, you need to log in
Static files in express?
I include static files like this
app.use('/',express.static(path.join(__dirname, 'public')))
, everything works great. But when I start using dynamic routes, the path to static files in the page resources changes from http://localhost:3000/style.css
to http://localhost:3000/information/style.css
. Route looks like '/information/:id'
. By itself, the route works fine and opens the page I need. Can you suggest what could be causing this?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question