mardi 6 mars 2018

Node getting confused between same names static files present in different folder

I have the following code in my app.js file,

   app.use(express.static('views/app1/dist'));
   app.use(express.static('views/app2/dist'));

but here I have same named JS files in both folder, they are designed to represent respective HTML file present in the same folder. The problem here is that even though I am routing to "app2" HTML file, the "app1" JS files are getting called. Need help in making NODE understand which folder files to execute.

Aucun commentaire:

Enregistrer un commentaire