Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>NestJS SnippetsNew to Visual Studio Code? Get it now.
NestJS Snippets

NestJS Snippets

Manu Codes

|
9,894 installs
| (1) | Free
Simple extension for NestJS
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Nest JS Snippets

Bits Theme for JavaScript Simple snippets pack to increase your productivity when developing with nestjs

Marketplace Installs Rating


Created by Manu Codes


Installation

The snippets is available in the VS Code marketplace. Search NestJS Snippets, install and go!

Usage


Prefix Method
nestcon→ Create new simple nest controller
nestcrud→ Create new CRUD controller
nestdel→ Create a Delete method
nestget→ Create a Get method
nestgetparam→ Create a Get method with url param
nestpost→ Create a Post method
nestput→ Create a Put method
nestmid→ Create a middleware class
nestguard→ Create a guard class
nestschema→ Create new mongodb schema
nestcron→ Create new shcedule class to use crons

Examples


This is the result of typing nestcon and press enter on your nest .ts file:

import { Controller } from '@nestjs/common';

@Controller('utl')
export class MyController {
	constructor() {}
}

This is the result of typing nestgetparam and press enter on your nest .ts file:

@Get('/:param')
async name(@Param('param') param: any, @Req() req: any, @Res() res: Response){
	// Put your magic here
}

This is the result of typing nestschema and press enter on your nest .ts file:

import { Prop, Schema, SchemaFactoryx} from '@nestjs/mongoose';
import { Document } from 'mongoose';

export type MySchemaDocument = MySchema & Document;
@Schema({
	 // timestamp: true
})
export class MySchema {
	@Prop()
	propName: string;

	// More props here
}

export const MySchemaSchema = SchemaFactory.createForClass(MySchema);

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft