Reputation: 391
I am trying to load my custom js file into my application but it's not working. I use node app engine to set the html through 'ejs' and the index.html
renders perfectly. It's just the js file that doesn't get recognized.
Any tips would be appreciated.
Below is my project structure, html code, and the errors i'm getting.
Upvotes: 0
Views: 776
Reputation: 1259
Your functions.js file shouldn't be in the views
folder. Move that into public/js/
. That is where express will look for that static files to serve.
The views
folder is really only for ejs files, in your case.
Upvotes: 2