I need to deploy my app with HTTPS on the same server with Direct Admin
First, I set the port to 8443 and start the server with node index.js. The server says that it's running on port 8443. But when I try to access https:// domain . com:8443/socket.io/socket.io.js, the browser return an error message "ERR_CONNECTION_REFUSED"
After that, I set the port to 443 (as someone said that HTTPS can only run with port 443) and start the server with sudo node index.js. This time the server did not start and retunr lot of error
PROJECT_PATH/node_modules/dotenv/lib/main.js:45 let value = keyValueArr[2] || '' ^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:373:25) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object. (PROJECT_PATH/index.js:16:25) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10)
How can I fix this?