...
| Bloque de código | ||
|---|---|---|
| ||
#vim https_server.js
var https = require('https');
var fs = require('fs');
var https_options = {
key: fs.readFileSync("/path/to/certificado.key"),
cert: fs.readFileSync("/path/to/certificado.pem"),
ca: [
fs.readFileSync('path/to/cadena.pem')
]
};
https.createServer(options, function (req, res) {
res.writeHead(200);
res.end("Welcome to Node.js HTTPS Servern");
}).listen(443) |
| Incluir página | ||||
|---|---|---|---|---|
|