Skip to content

Commit 5f3053a

Browse files
committed
feat: change root endpoint to return API metadata JSON and document Live Demo URLs in README.md
1 parent 4e1f96d commit 5f3053a

4 files changed

Lines changed: 33 additions & 9 deletions

File tree

‎README.md‎

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,22 @@ pnpm run start:dev
123123

124124
## 📊 Endereços Úteis do Projeto
125125

126-
### 📄 **Documentação da API (Scalar)**
127-
Acesse [http://localhost:3000/docs](http://localhost:3000/docs) para interagir com os endpoints da API por meio de uma interface moderna e bonita.
126+
### 🌐 **Live Demo (Deploy no Render)**
127+
A API está publicada e disponível publicamente nos links abaixo:
128+
- **API Principal (Metadados em JSON)**: [https://queueapi-nestjs.onrender.com/](https://queueapi-nestjs.onrender.com/)
129+
- **Documentação da API (Scalar)**: [https://queueapi-nestjs.onrender.com/docs](https://queueapi-nestjs.onrender.com/docs)
130+
- **Dashboard de Filas (Bull Board)**: [https://queueapi-nestjs.onrender.com/admin/queues](https://queueapi-nestjs.onrender.com/admin/queues)
128131

129-
### 📈 **Dashboard de Filas (Bull Board)**
130-
Acesse [http://localhost:3000/admin/queues](http://localhost:3000/admin/queues) para inspecionar visualmente os jobs ativamente em processamento, completados ou falhos.
132+
> [!NOTE]
133+
> **Aviso sobre Cold Start**: Por estar hospedada no plano gratuito da Render, a aplicação entra em suspensão após um período de inatividade. A primeira requisição após isso pode levar em torno de 50 segundos para responder devido à inicialização fria da máquina virtual.
134+
135+
---
136+
137+
### 📄 **Documentação da API Local (Scalar)**
138+
Acesse [http://localhost:3000/docs](http://localhost:3000/docs) para interagir com os endpoints da API localmente por meio de uma interface moderna e bonita.
139+
140+
### 📈 **Dashboard de Filas Local (Bull Board)**
141+
Acesse [http://localhost:3000/admin/queues](http://localhost:3000/admin/queues) para inspecionar visualmente os jobs ativamente em processamento local, completados ou falhos.
131142

132143
---
133144

‎src/app.controller.spec.ts‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,14 @@ describe('AppController', () => {
1515
});
1616

1717
describe('root', () => {
18-
it('should return "Hello World!"', () => {
19-
expect(appController.getHello()).toBe('Hello World!');
18+
it('should return API metadata', () => {
19+
expect(appController.getHello()).toEqual(
20+
expect.objectContaining({
21+
name: 'Queue API - NestJS',
22+
docs: '/docs',
23+
dashboard: '/admin/queues',
24+
}),
25+
);
2026
});
2127
});
2228
});

‎src/app.controller.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export class AppController {
88
constructor(private readonly appService: AppService) {}
99

1010
@Get()
11-
getHello(): string {
11+
getHello() {
1212
return this.appService.getHello();
1313
}
1414
}

‎src/app.service.ts‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@ import { Injectable } from '@nestjs/common';
22

33
@Injectable()
44
export class AppService {
5-
getHello(): string {
6-
return 'Hello World!';
5+
getHello() {
6+
return {
7+
name: 'Queue API - NestJS',
8+
description:
9+
'API de processamento assíncrono de filas com BullMQ e Redis',
10+
version: '1.0.0',
11+
docs: '/docs',
12+
dashboard: '/admin/queues',
13+
};
714
}
815
}

0 commit comments

Comments
 (0)