Normally in app.js
i use this code on port 3000
it's work good (on my-domain.com:3000
).
.
http.listen(3000, function(){
console.log('start server on port :3000');
});
then i want to use on https
, so i change app.js
to
http.listen(443, function(){
console.log('start server on port :443');
});
When run node app.js
, it's show error
events.js:160
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE :::443
at Object.exports._errnoException (util.js:1012:11)
at exports._exceptionWithHostPort (util.js:1035:20)
at Server._listen2 (net.js:1252:14)
at listen (net.js:1288:10)
at Server.listen (net.js:1384:5)
at Object.<anonymous> (/home/admin/web/my-domain.com/public_html/app.js:28:6)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
Normally i have to access to my-domain.com:3000
for user chat. So i want to know how can i access to https://www.my-domain.com
for user chat ?