diff options
author | terminaldweller <thabogre@gmail.com> | 2021-09-08 23:30:46 +0000 |
---|---|---|
committer | terminaldweller <thabogre@gmail.com> | 2021-09-08 23:30:46 +0000 |
commit | d2e15f26b049cce4a52deba2698ef44fd4ab2248 (patch) | |
tree | 8d0416f5efa7bb2a6e45160334ad2c9e040310f8 /server.js | |
parent | added a codacy badge (diff) | |
download | blog-d2e15f26b049cce4a52deba2698ef44fd4ab2248.tar.gz blog-d2e15f26b049cce4a52deba2698ef44fd4ab2248.zip |
https
Diffstat (limited to 'server.js')
-rwxr-xr-x | server.js | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -19,6 +19,7 @@ const mit = require("markdown-it")({ html: true }) auto: true, code: true, }); +const https = require("https"); const app = express(); app.use(express.static(path.join(__dirname, "css"))); @@ -93,4 +94,9 @@ app.use((err, req, res) => { return res.status(500).send({ error: err }); }); -app.listen(9000); +https.createServer({ + key: fs.readFileSync('/certs/server.key'), + cert: fs.readFileSync("/certs/server.cert") +},app).listen(9000); + +// app.listen(9000); |