From b897e6bb41b5a73f9a87e9a54dc2ffa79f69f136 Mon Sep 17 00:00:00 2001 From: AV77web Date: Sun, 21 Jun 2026 00:10:07 +0200 Subject: [PATCH] correzioni a Dockerfile, a tsconfig.json e creazione src/index.ts --- dockerfile/Dockerfile | 2 +- src/index.ts | 19 +++++++++++++++++++ tsconfig.json | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 src/index.ts diff --git a/dockerfile/Dockerfile b/dockerfile/Dockerfile index e4cfe39..7a81f8f 100644 --- a/dockerfile/Dockerfile +++ b/dockerfile/Dockerfile @@ -7,7 +7,7 @@ WORKDIR /app COPY package*.json ./ RUN npm ci -COPY tsconfig.json tsconfig.build.json ./ +COPY tsconfig.json ./ COPY src ./src RUN npm run build diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..290ecf4 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,19 @@ +import cors from "cors"; +import dotenv from "dotenv"; +import express from "express"; + +dotenv.config(); + +const app = express(); +const port = Number(process.env.PORT) || 3005; + +app.use(cors({ origin: process.env.FRONTEND_URL })); +app.use(express.json()); + +app.get("/health", (_req, res) => { + res.json({ status: "ok" }); +}); + +app.listen(port, () => { + console.log(`Server listening on port ${port}`); +}); diff --git a/tsconfig.json b/tsconfig.json index e0f1497..8805a9e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,7 +8,7 @@ "strict": true, "esModuleInterop": true, "skipLibCheck": true, - "forceConsistentCaslignInFileNames": true, + "forceConsistentCasingInFileNames": true, "resolveJsonModule": true }, "include": ["src/**/*"],