Created
November 17, 2019 12:28
-
-
Save dmelechow/72748723743bb54a2c4548fd3d9e59bf to your computer and use it in GitHub Desktop.
nodejs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var https = require('https'); | |
| var http = require('http'); | |
| var fs = require('fs'); | |
| var options = { | |
| key: fs.readFileSync('./localhost.key').toString(), | |
| cert: fs.readFileSync('./localhost.crt').toString(), | |
| ciphers: 'ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES256-SHA384', | |
| honorCipherOrder: true, | |
| secureProtocol: 'TLSv1_2_method' | |
| }; | |
| https.createServer(options, app).listen(port, () => { | |
| console.log('server is running on port ' + port) | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment