-1

I have set up nodeJS app on cpanel using cpanel nodeJS selector. Apps root directory is /home/userName/public_html/server. The app is working fine.

Problem is if I send get request to example.com/server/app.js it is displaying the source code of app.js in the browser.

How do I prevent it?

1 Answers1

0

You should create put your app.js or application root not in folder public_html. just create folder in /home/userName/nodejs or something like that.