inserito file src/index.ts
This commit is contained in:
parent
9bce1db659
commit
d812d97c41
1 changed files with 23 additions and 0 deletions
23
src/index.ts
Normal file
23
src/index.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
import { ExpressAuth } from "@auth/express";
|
||||||
|
import dotenv from "dotenv";
|
||||||
|
import express from "express";
|
||||||
|
|
||||||
|
|
||||||
|
dotenv.config();
|
||||||
|
|
||||||
|
const app = express();
|
||||||
|
const port = Number(process.env.PORT ?? 3001);
|
||||||
|
|
||||||
|
app.set("trust proxy", 1);
|
||||||
|
|
||||||
|
app.use(express.json());
|
||||||
|
|
||||||
|
|
||||||
|
app.get("/api/health", (_req, res) => {
|
||||||
|
res.json({ status: "ok" });
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
app.listen(port, "0.0.0.0", () => {
|
||||||
|
console.log(`Server in ascolto sulla porta ${port}`);
|
||||||
|
});
|
||||||
Loading…
Add table
Reference in a new issue