refacto: Changing some docker images to hardened non-root ones + README update
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import express from "express";
|
||||
import cors from "cors";
|
||||
import path from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import authRouter from "./routes/auth.js";
|
||||
@@ -8,6 +9,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
const publicDir = path.join(__dirname, "..", "public");
|
||||
|
||||
const app = express();
|
||||
app.use(cors({ origin: process.env.CORS_ORIGIN ?? "*" }));
|
||||
app.use(express.json());
|
||||
app.use(express.static(publicDir));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user