You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cat>./src/service.js<<'EOF'constapp=require('./app');constPORT=process.env.PORT||3000;app.listen(PORT,()=>{console.log(`HTTPS Server is running on https://localhost:${PORT}`);});EOF
secure_service.js <heredoc
cat>./src/secure_service.js<<'EOF'consthttps=require('https');constfs=require('fs');constapp=require('./app');constPORT=process.env.SECURE_PORTT||443;consttlsOptions={key: fs.readFileSync('./certs/server.key'),cert: fs.readFileSync('./certs/server.cert')};https.createServer(tlsOptions,app).listen(PORT,()=>{console.log(`HTTPS Server is running on https://localhost:${PORT}`);});EOF