Hi guys.
Sorry to be such a pest on here with so many questions. I am trying to deploy my very first Node.js application onto my cPanel account. I have used the Express framework in my application along with express-ejs-layouts to render the different webpages.
The application works perfectly fine on my localhost but I get a 403 forbidden response on the web when I go to my domain after setting it up on my cPanel. When I use an example file instead which simply outputs “Hello World” into the browser it works because it utilises a function called createServer() after using require(‘http’).
I’m assuming in order for my application to work on the web I need to somewhere add in require(‘http’) and http.createServer()? But because I’m new to this, I don’t understand how I manage to still utilise Express after using createServer(). Apologies if I’m missing something simple here. I can post my code if it helps. Any help or guidance would be much appreciated.
Thanks,
Aaron