This commit is contained in:
Jeremy Yin 2019-06-17 22:55:14 +08:00
parent b09fa24810
commit 31f62a8fa8
1 changed files with 7 additions and 2 deletions

View File

@ -1,9 +1,14 @@
import { Controller, Get } from '@nestjs/common';
import { Controller, Get, Req } from '@nestjs/common';
@Controller('posts')
export class PostsController {
@Get()
index() {
index(@Req() request) {
console.log(
request.ip,
request.hostname,
request.method,
)
return [
{
title: 'hello ~'