aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2021-09-11 19:37:09 +0000
committerterminaldweller <thabogre@gmail.com>2021-09-11 19:37:09 +0000
commit177bdbd9a54283025af78edaa77f73a850e0236b (patch)
treeb9cb352e9045872b76291b8d87b33fffd1bb0c0c
parenthttps working now (diff)
downloadblog-177bdbd9a54283025af78edaa77f73a850e0236b.tar.gz
blog-177bdbd9a54283025af78edaa77f73a850e0236b.zip
http2 WIP
Diffstat (limited to '')
-rwxr-xr-xserver.js17
1 files changed, 10 insertions, 7 deletions
diff --git a/server.js b/server.js
index 231f70b..0c245a3 100755
--- a/server.js
+++ b/server.js
@@ -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);