Thursday 8 June 2017

Why can't I access my image folder

When I start the server the page doesn't have the images, I confirmed this by going to the sources tab of the developer console, it has the sylesheets folder, but not the images folder. I am using cloud 9 as my IDE, and in my work space I have a directory named public, and two sub directories named images and stylesheets. In my app.js file I serve them to server with...

app.use(express.static(__dirname + "/public"));

I have tried many different variations of this code including...

app.use('/public', express.static(__dirname + "/public"));

and I still have the same problem. I point this code out because it has solved others problems, but it still wont show up.



via PiggMiner

No comments:

Post a Comment