Files
ratrapage_T-WEB/Express/barAndCafe/src/swaggerDef.ts
Clement 532b12d4f5
Some checks failed
Build Docker Image Front / run (pull_request) Successful in 26s
Build Docker Image Back / run (pull_request) Successful in 43s
JsDocs / coverage (pull_request) Successful in 36s
Test and coverage / coverage (pull_request) Failing after 1m49s
fix swagger run in prod
2024-05-24 16:13:28 +02:00

29 lines
576 B
TypeScript

import * as dotenv from "dotenv";
dotenv.config({path: '../../.env'})
const port = parseInt(process.env.BAR_PORT || '3000')
const options = {
definition: {
openapi: "3.1.0",
info: {
title: "LogRocket Express API with Swagger",
version: "0.1.0",
description:
"This is a simple CRUD API application made with Express and documented with Swagger",
},
servers: [
{
url: "http://localhost:"+port.toString(),
},
{
url: "https://drink-tweb.cb85.fr"
}
],
},
apis: ['./src/*.ts','./dist/src/*.js'],
explorer: true
}
export default options