added cert to snakes
This commit is contained in:
parent
ac8b0f09ba
commit
acd70f0a49
4
snakes/cert.json
Normal file
4
snakes/cert.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"path":"./cert.pfx",
|
||||||
|
"password": ""
|
||||||
|
}
|
||||||
BIN
snakes/cert.pfx
Normal file
BIN
snakes/cert.pfx
Normal file
Binary file not shown.
16
snakes/pfxTest.js
Normal file
16
snakes/pfxTest.js
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
|
||||||
|
const https = require('https');
|
||||||
|
const fs = require('fs');
|
||||||
|
const port = 8000;
|
||||||
|
|
||||||
|
console.log("Listening on " + port);
|
||||||
|
|
||||||
|
const options = {
|
||||||
|
pfx: fs.readFileSync('cert.pfx')
|
||||||
|
};
|
||||||
|
|
||||||
|
https.createServer(options, (req, res) => {
|
||||||
|
console.log("Request from " + (req.socket ? req.socket.remoteAddress : "NULL"));
|
||||||
|
res.writeHead(200);
|
||||||
|
res.end('hello world\n');
|
||||||
|
}).listen(port);
|
||||||
Loading…
Reference in New Issue
Block a user