diff options
author | terminaldweller <thabogre@gmail.com> | 2021-09-11 19:37:09 +0000 |
---|---|---|
committer | terminaldweller <thabogre@gmail.com> | 2021-09-11 19:37:09 +0000 |
commit | 177bdbd9a54283025af78edaa77f73a850e0236b (patch) | |
tree | b9cb352e9045872b76291b8d87b33fffd1bb0c0c | |
parent | https working now (diff) | |
download | blog-177bdbd9a54283025af78edaa77f73a850e0236b.tar.gz blog-177bdbd9a54283025af78edaa77f73a850e0236b.zip |
http2 WIP
Diffstat (limited to '')
-rwxr-xr-x | server.js | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -19,7 +19,7 @@ const mit = require("markdown-it")({ html: true }) auto: true, code: true, }); -const https = require("https"); +const spdy = require("spdy"); const app = express(); app.use(express.static(path.join(__dirname, "css"))); @@ -94,9 +94,12 @@ app.use((err, req, res) => { return res.status(500).send({ error: err }); }); -https.createServer({ - key: fs.readFileSync("/certs/privkey1.pem","utf-8"), - cert: fs.readFileSync("/certs/fullchain1.pem","utf-8") -},app).listen(9000); - -// app.listen(9000); +spdy + .createServer( + { + key: fs.readFileSync("/certs/privkey1.pem", "utf-8"), + cert: fs.readFileSync("/certs/fullchain1.pem", "utf-8"), + }, + app + ) + .listen(9000); |