Skip to content

Instantly share code, notes, and snippets.

View rskhan167's full-sized avatar

Rasool Khan rskhan167

View GitHub Profile
@rskhan167
rskhan167 / nest-cli.json
Created October 13, 2021 15:21
Nestjs Series
{
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"compilerOptions": {
"plugins": [
{
"name": "@nestjs/swagger/plugin",
"options": {
"dtoFileNameSuffix": [".entity.ts", ".dto.ts"],
"controllerFileNameSuffix": [".controller.ts"]
@rskhan167
rskhan167 / user.controller.ts
Last active October 13, 2021 15:38
Nestjs Series - Part 3
import { Controller, Post, Body, Get, Param } from '@nestjs/common';
import { ApiOkResponse } from '@nestjs/swagger';
import { CreateUserDto } from './dtos/create-user.dto';
import { UserService } from './user.service';
import { User } from './entities/user.entity';
@Controller('user')
export class UserController {
constructor(private readonly userService: UserService) {}