From ed1db56ab2f031cf6e6f51fba0d0e295598968e5 Mon Sep 17 00:00:00 2001 From: Leah Cloudburst Date: Mon, 23 May 2022 20:05:21 +0100 Subject: Update 'index.ts' --- index.ts | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/index.ts b/index.ts index 166782b..ef67a8e 100644 --- a/index.ts +++ b/index.ts @@ -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 -- cgit