Some checks failed
Build Docker Image Front / run (push) Successful in 23s
Build Docker Image Back / run (push) Successful in 1m7s
Build Docker Image Front / run (pull_request) Successful in 23s
Build Docker Image Back / run (pull_request) Successful in 20s
JsDocs / coverage (pull_request) Failing after 26s
Test and coverage / coverage (pull_request) Failing after 38s
32 lines
714 B
TypeScript
32 lines
714 B
TypeScript
import express from "express"
|
|
/**
|
|
* Initialize Express application instance.
|
|
* @returns An initialized Express application object.
|
|
*/
|
|
const app = express()
|
|
|
|
|
|
|
|
/**
|
|
* Handle GET request for homepage route ('/welcome').
|
|
* Send back a simple json response.
|
|
* @param {express.Request} req - HTTP Request object.
|
|
* @param {express.Response} res - HTTP Response object.
|
|
*/
|
|
function getWelcome(req: express.Request, res: express.Response) {
|
|
const out = {hello:"world"}
|
|
res.send(out)
|
|
}
|
|
|
|
/**
|
|
* @openapi
|
|
* /welcome:
|
|
* get:
|
|
* description: Welcome to swagger-jsdoc!
|
|
* responses:
|
|
* 200:
|
|
* description: Returns a welcome json.
|
|
*/
|
|
app.get("/welcome", getWelcome)
|
|
|
|
export default app |