correzioni a Dockerfile, a tsconfig.json e creazione src/index.ts
Some checks are pending
Deploy to VPS / deploy (push) Blocked by required conditions
Deploy to VPS / build (push) Successful in 14s

This commit is contained in:
AV77web 2026-06-21 00:10:07 +02:00
parent c11f1eef15
commit b897e6bb41
3 changed files with 21 additions and 2 deletions

View file

@ -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

19
src/index.ts Normal file
View file

@ -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}`);
});

View file

@ -8,7 +8,7 @@
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCaslignInFileNames": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true
},
"include": ["src/**/*"],