Introduction of NestJs : The NestJs Journey with Shiv (Part-1)

Introduction:

NestJS is a framework for building server-side applications with JavaScript or TypeScript. It's built on top of Node.js and is designed to make it easier to create scalable and maintainable applications by providing a structure and set of tools inspired by Angular (a popular front-end framework).





  • Node.js Framework: NestJS is specifically tailored for Node.js, allowing developers to use JavaScript or TypeScript to build the server-side logic of their applications.
  • Modular and Scalable: It encourages a modular structure, making it easy to organize code and scale applications as they grow in complexity.
  • Inspired by Angular: If you're familiar with Angular on the front end, NestJS might feel familiar. It borrows concepts and design patterns from Angular, making it easier for developers to switch between the front end and back end.
  • Uses TypeScript: While it supports JavaScript, NestJS is often used with TypeScript, a superset of JavaScript that adds static typing. TypeScript can help catch errors early in development and improve code quality.
  • Supports REST and GraphQL: NestJS allows you to build both RESTful APIs and GraphQL APIs, giving you flexibility in choosing the API style that best fits your project.
  • Dependency Injection: It makes use of dependency injection, a design pattern that helps manage the components and services of an application, making it more modular and testable.
  • In summary, NestJS is a powerful and flexible framework that simplifies the process of building robust server-side applications using JavaScript or TypeScript, with a focus on modularity and scalability.


Installation:

  • Install Node.js and npm:
  • If you don't have Node.js installed, you can download it from the official website: Node.js.
  • Open a Terminal or Command Prompt:
  • Open your terminal or command prompt. You'll use this to run commands.

Install the Nest CLI:

Run the following command to install the Nest CLI globally on your machine:
    npm install -g @nestjs/cli
    nest new [Project Name]
    
Example:
    nest new LearnNestJs
    

Thank you for reading

Comments

Popular Posts