File size: 575 Bytes
1e3bf12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { Controller, Req, Res, All, Get, Post } from '@nestjs/common';
import { Request, Response } from 'express';

@Controller(['/', '/healthz'])
export class ApigatewayController {

  @Get()
  async healthz(@Req() req: Request, @Res() res: Response) {
    console.log('Request received:', req.method, req.url);
    res.send('🚀 ApiGateway is running...............');
  }

  @All()
  async test(@Req() req: Request, @Res() res: Response) {
    console.log('POST Request received:', req.method, req.url);
    res.send('🚀 ApiGateway is running...............');
  }

}