diff options
-rw-r--r-- | index.ts | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -1,14 +1,6 @@ import express from "express"; -import https from "https"; -import { readFileSync } from "fs"; import si from "systeminformation"; -var privateKey = readFileSync('/etc/letsencrypt/live/equestria.dev/cert.pem', 'utf8'); -var certificate = readFileSync('/etc/letsencrypt/live/equestria.dev/privkey.pem', 'utf8'); -const ca = readFileSync('/etc/letsencrypt/live/equestria.dev/chain.pem', 'utf8'); - -var credentials = {key: privateKey, cert: certificate, ca: ca}; - const app = express(); app.get("/json", async (req, res) => { @@ -62,6 +54,6 @@ app.get("/json", async (req, res) => { }); }); -var httpsServer = https.createServer(credentials, app); - -httpsServer.listen(52937);
\ No newline at end of file +app.listen(52937).then(() => { + console.log("listening!"); +});
\ No newline at end of file |