i can hit the url like
localhost/foodbucket/app.js
and see everything.
I want to prevent this.
var config = require('./config/config.js');
var app = require('express')();
var http = require('http').Server(app);
var mysql = require('mysql');
var pool = require('./config/database.js')(config.MYPOOL,mysql);
var io = require('./lib/socket.js')(http,mysql,pool);
var notificationcron = require('./crons/notification.js')
(io,pool,mysql,config.NotificationStatus);
const router = app.Router();
router.get('/', "Error 404");
http.listen(4849, function() {
console.log('Listening on port ' + 4849);
});
Solution : Add an .htaccess file inside Node directory. Write "Deny from all" in .htaccess