Skip to content

Commit

Permalink
Merge pull request #13 from erik1110/feature/api
Browse files Browse the repository at this point in the history
Feature/api
  • Loading branch information
erik1110 committed Jan 17, 2024
2 parents 78976e7 + 02b1917 commit 4b0d660
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@ async function bootstrap() {
app.useGlobalFilters(new ErrorHandlerFilter());
const config = new DocumentBuilder()
.setTitle('Hotel Reservation Backend')
.setDescription('This is my swagger document.')
.setDescription(`Building a Hotel Reservation API on the Backend with TypeScript.\n\nNote: After successful login, please click on "Authorize" and enter your access token.\n\nExample Code :
fetch('/api/v1/home/news', { method: 'GET' })
.then(response => response.json())
.then(res => {
// { status: 'true', result: [{...}] }
console.log(res);
});
`)
.setVersion('1.0')
.addServer(`http://localhost:${process.env.PORT}`, 'Local Environment')
.addServer(process.env.PRODUCTION_URL, 'Production') // HTTPS scheme
Expand Down

0 comments on commit 4b0d660

Please sign in to comment.