Refactor general pour ajout d'un flow CI/CD

This commit is contained in:
Florian Sylvain
2023-02-09 20:05:33 +01:00
parent ff0cb60890
commit 6998217399
18 changed files with 298 additions and 201 deletions
+27
View File
@@ -0,0 +1,27 @@
import express from "express";
import cors from 'cors';
import jeux from './route/jeux.js'
import groupe from './route/groupe.js'
import * as dotenv from 'dotenv'
dotenv.config()
const app = express()
app.use(express.json())
app.use(express.urlencoded({ extended: true }))
const port = process.env.API_PORT
app.use(
cors({
origin: [process.env.CORS_ORIGIN ?? '*'],
})
);
app.use('/', jeux)
app.use('/', groupe)
// run the server
app.listen(port, () => {
console.log(`Example app listening on port ${port}`);
});