https://github.com/ajay-dhangar/bookstore-nest
Getting Started with NestJS
https://github.com/ajay-dhangar/bookstore-nest
Last synced: 6 months ago
JSON representation
Getting Started with NestJS
- Host: GitHub
- URL: https://github.com/ajay-dhangar/bookstore-nest
- Owner: ajay-dhangar
- Created: 2024-03-21T09:01:14.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-29T03:17:05.000Z (over 1 year ago)
- Last Synced: 2025-03-28T05:41:42.025Z (7 months ago)
- Language: TypeScript
- Homepage: https://bookstore-nest.onrender.com
- Size: 85.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Getting Started with NestJS
Now that you have a basic understanding of what NestJS is, let's get started with creating a new NestJS project.
Our project is Book Store.
## Step 1: Install NestJS CLI
To create a new NestJS project, you need to install the NestJS CLI. You can do this by running the following command:
```bash
npx @nestjs/cli new bookstore-nest
```This command will create a new NestJS project called `bookstore-nest`.
## Step 2: Run the NestJS Project
Once the project is created, navigate to the project directory and run the following command to start the NestJS server:
```bash
cd bookstore-nest
npm run start
```This will start the NestJS server on `http://localhost:3000`.
## Step 3: Create a New Module
Now that the project is up and running, let's create a new module called `books`. To do this, run the following command:
```bash
nest generate module books
```This command will create a new module called `books` in the project.
## Step 4: Create a New Controller
Next, let's create a new controller called `books` inside the `books` module. To do this, run the following command:
```bash
nest generate controller books
```This command will create a new controller called `books` inside the `books` module.
## Step 5: Create a New Service
Finally, let's create a new service called `books` inside the `books` module. To do this, run the following command:
```bash
nest generate service books
```This command will create a new service called `books` inside the `books` module.
That's it! You have now created a new NestJS project and added a new module, controller, and service to the project. You can now start building your Book Store application using NestJS.