1152 shaares
4 private links
4 private links
4 results
tagged
nodejs
Sans Express.js:
const https = require("https"),
fs = require("fs");
const options = {
key: fs.readFileSync("/etc/letsencrypt/live/example.com/privkey.pem"),
cert: fs.readFileSync("/etc/letsencrypt/live/example.com/fullchain.pem")
};
https.createServer(options, function (req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
res.end('Hello World!');
}).listen(443);
Nodemon is a utility that will monitor for any changes in your source and automatically restart your server.
How to install nodejs depending on your system