From e9d5c01da0db52b2905795a8613df71e7b0d152c Mon Sep 17 00:00:00 2001 From: Ben Huang Date: Sat, 13 Jan 2024 08:27:55 -0500 Subject: [PATCH 1/2] chore: update .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index d3a6608..ed9d205 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ node_modules tests *.sql package-lock.json +*.sh +certificates \ No newline at end of file From e809e164be667bf0f1102fadc97559c733cc75a3 Mon Sep 17 00:00:00 2001 From: Ben Huang Date: Sat, 13 Jan 2024 08:36:42 -0500 Subject: [PATCH 2/2] chore: clean up index.js --- index.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/index.js b/index.js index b889ccd..f17388c 100644 --- a/index.js +++ b/index.js @@ -3,7 +3,6 @@ const path = require('path'); const fs = require('fs'); const express = require("express"); const cors = require("cors"); -const { createServer } = require("http"); const { Server } = require("socket.io"); const bodyParser = require("body-parser"); const cookieParser = require("cookie-parser"); @@ -20,12 +19,9 @@ const mainDatabase = shared.mainDatabase; const app = express(); const PORT = 3000; const httpsServer = https.createServer({ - key: fs.readFileSync(path.join(__dirname, - "certificates", "ssl-key.pem")), - cert: fs.readFileSync(path.join(__dirname, - "certificates", "ssl-cert.pem")), + key: fs.readFileSync(path.join(__dirname, "certificates", "ssl-key.pem")), + cert: fs.readFileSync(path.join(__dirname, "certificates", "ssl-cert.pem")), }, app); -//const httpServer = createServer(app); const allowedOrigins = ['https://5f1d88b5-ed3b-45d6-a38a-68cb84d353e4-00-1camjx4r35yd1.kirk.replit.dev', 'https://f6ed8a6e-dc13-4fc5-acb1-8fc2d046a998-00-302k4b0c8frun.global.replit.dev']; const corsOptions = { origin: allowedOrigins, @@ -127,16 +123,12 @@ app.get("/supervisees", async (req, res) => { }); app.get("/", (req, res) => { - const p = `

+ const message = `

Backend Lab
by Ben Huang
Messiah University

`; - - /*res.send(`Backend Lab\n - by Ben Huang\n - Messiah University`)*/ - res.send(p); + res.send(message); }); \ No newline at end of file