Question
Routing node.js with express js
Hello everyone,
I am having a problem with my website. I am running Ubuntu 16.04.1 x64 with node.js. For my website, whenever I go to the other pages on my website. It directs them to the 404 page even though I have a routing set for it.
Here is my server.js file: http://pastebin.com/J8fK77H8
For my other configurations for nginx, everything has been based from this guide here: https://code.lengstorf.com/deploy-nodejs-ssl-digitalocean/
It actually is my first time deploying a node.js app here so I am still not the best with it.
Hope someone can help here
Thanks,
Michael
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
A couple questions.
1.) Are you seeing your custom 404 page defined in your app or the default one from nginx?
2.) Are you seeing a 404 for all pages including
/
or just for certain ones?