move app source
All checks were successful
Build Docker Image Front / run (push) Successful in 24s
Build Docker Image Back / run (push) Successful in 23s
Build Docker Image Front / run (pull_request) Successful in 21s
Build Docker Image Back / run (pull_request) Successful in 23s

This commit is contained in:
Clement 2024-05-03 17:08:01 +02:00
parent 04dfb78d57
commit 94b2ce2d16
2 changed files with 22 additions and 7 deletions

View File

@ -0,0 +1,21 @@
import express from "express";
/**
* Initialize Express application instance.
* @returns An initialized Express application object.
*/
const app = express();
/**
* Handle GET request for homepage route ('/').
* Send back a simple text response.
* @param {express.Request} req - HTTP Request object.
* @param {express.Response} res - HTTP Response object.
*/
function getRoot(req: express.Request, res: express.Response) {
res.send("hello world from dev");
}
app.get("/", getRoot);
export default app;

View File

@ -1,16 +1,10 @@
import express from "express";
import * as dotenv from "dotenv";
import app from "./app";
dotenv.config({path: '../../.env'})
const port = parseInt(process.env.BAR_PORT || '3000')
const app = express();
app.get("/", (req, res) => {
res.send("helloworld form dev")
})
app.listen(port, () =>{
console.log(`serveur running in ${port}`)
})