Skip to content

Commit

Permalink
chore: merge branch 'main' into gha
Browse files Browse the repository at this point in the history
  • Loading branch information
benhuangbmj committed Jan 13, 2024
2 parents 2178970 + 0e2c078 commit 6ac65b7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,10 @@ node_modules
tests
*.sql
package-lock.json
<<<<<<< HEAD
*.sh
certificates
=======
*.pem
*.sh
>>>>>>> ssl
16 changes: 4 additions & 12 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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,
Expand Down Expand Up @@ -127,16 +123,12 @@ app.get("/supervisees", async (req, res) => {
});

app.get("/", (req, res) => {
const p = `<p style="color: green; width: fit-content; margin: auto; text-align: center">
const message = `<p style="color: green; width: fit-content; margin: auto; text-align: center">
Backend Lab
<br>
by Ben Huang
<br>
Messiah University
</p>`;

/*res.send(`Backend Lab\n
by Ben Huang\n
Messiah University`)*/
res.send(p);
res.send(message);
});

0 comments on commit 6ac65b7

Please sign in to comment.