Commit 8bbe41f2 by Augusto

server settings

parent 7fe4d144
module.exports = {
apps: [
{
name: 'Cellnex API',
script: 'src/main.js',
instances: 1,
exec_mode: 'fork',
autorestart: true,
watch: false,
max_memory_restart: '1G',
env: {
NODE_ENV: 'production',
PORT: 3905,
DATABASE_URL: process.env.DATABASE_URL,
JWT_SECRET: process.env.JWT_SECRET,
},
error_file: 'logs/err.log',
out_file: 'logs/out.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
time: true,
min_uptime: '60s',
max_restarts: 5,
restart_delay: 3000,
node_args: '--max-old-space-size=1024',
},
],
};
......@@ -12,7 +12,7 @@ export class LoginDto {
@ApiProperty({
description: 'The password of the user',
example: 'brandit123465',
example: 'passsword',
})
@IsString()
@IsNotEmpty()
......
import { ApiProperty } from '@nestjs/swagger';
export class SiteResponseDto {
@ApiProperty({ description: 'Site ID' })
id: number;
@ApiProperty({ description: 'Site code' })
code: string;
@ApiProperty({ description: 'Site name' })
name: string;
@ApiProperty({ description: 'Latitude coordinate' })
latitude: number;
@ApiProperty({ description: 'Longitude coordinate' })
longitude: number;
@ApiProperty({ description: 'Address of the site' })
address: string;
@ApiProperty({ description: 'Creation timestamp' })
createdAt: Date;
@ApiProperty({ description: 'Last update timestamp' })
updatedAt: Date;
}
\ No newline at end of file
......@@ -83,6 +83,22 @@ export class SitesController {
@ApiResponse({
status: 200,
description: 'Return the site with its candidates.',
schema: {
properties: {
data: {
type: 'object',
properties: {
id: { type: 'number' },
code: { type: 'string' },
name: { type: 'string' },
candidates: {
type: 'array',
items: { $ref: '#/components/schemas/CandidateResponseDto' }
}
}
}
}
}
})
@ApiResponse({ status: 404, description: 'Site not found.' })
findOneWithCandidates(@Param('id', ParseIntPipe) id: number) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment