NestJS Snippets for Backend Development
🚀 Overview
A collection of NestJS VS Code snippets designed to speed up backend development by reducing repetitive boilerplate code.
⚡ Snippets
| Name |
Prefix |
Description |
| NestJS Service |
nest-nestService |
Creates a NestJS service with Injectable decorator |
| Inject Model |
nest-injectModel |
Mongoose InjectModel snippet for schema injection |
| Inject Model |
nest-injectService |
NestJS Inject Service (example: EmailService -> private emailService: EmailService ) |
| Inject Model |
nest-controller |
NestJS Controllers (Example: UserController) |
🧑💻 Usage
- Open a
.ts file in VS Code
- Type the snippet prefix
- Press
Tab or Ctrl + Space
📌 Example Snippets
NestJS Service
import { Injectable } from '@nestjs/common';
import { InjectModel } from '@nestjs/mongoose';
import { Model } from 'mongoose';
@Injectable()
export class AuthService {
constructor(
) {}
}
Developed By
Developed with ❤️ by Jehan Weerasuriya Black Alpha Labs
🌐 Website: https://www.blackalphalabs.com/
| |