I’m using the cluster npm for my node app.
var cluster = require('cluster');
var app = express.createServer({
key: fs.readFileSync('privatekey.pem'),
cert: fs.readFileSync('certificate.pem')
});
cluster(app)
.use(cluster.logger('logs'))
.use(cluster.stats())
.use(cluster.pidfiles('pids'))
.use(cluster.cli())
.listen(443);
But I got the Permission denied when I use port 443. It’s working fine if I use another port . Obviously 443 is dedicated to https, so how can I use it for my app ?
By default node can’t access lower ports (unless you’re
root). Don’t be afraid though since any port will do.The one usually used for development purposes is
8443: