An open API service indexing awesome lists of open source software.

https://github.com/puskar-roy/nestjs_api

This REST API features CRUD routes for users, along with registration, login functionalities, and route protection. ๐Ÿš€
https://github.com/puskar-roy/nestjs_api

authentication nestjs postgresql restapi typeorm typescript

Last synced: 2 months ago
JSON representation

This REST API features CRUD routes for users, along with registration, login functionalities, and route protection. ๐Ÿš€

Awesome Lists containing this project

README

          





Logo

NEST Js + Type ORM + Postgre SQL +Json Web Tokens


This REST API features CRUD routes for users, along with registration, login functionalities, and route protection. ๐Ÿš€๐Ÿ”






Report Bug
ยท
Request Feature


## Getting Started ๐Ÿš€

### Prerequisites
Before you begin contributing to this project, make sure you have the following set up:

- [Node.js](https://nodejs.org/): A JavaScript runtime.
- [npm](https://www.npmjs.com/): The Node.js package manager.

### Run This โŒจ๏ธ

1. **Clone the Repository:**
```bash
git clone https://github.com/Puskar-Roy/NestJs_API.git
```
2. **Install Dependencies:**
```bash
npm install
```
3. **Run This Project:**
```bash
npm run dev
```
or

```bash
npm start
```

(back to top)


## API End Points ๐ŸŒŸ
1. **Home Route** ๐Ÿš€
```bash
GET - http://localhost:3000/
```
2. **Register User Route** ๐Ÿ“ฅ
```bash
POST - http://localhost:3000/api/auth/register
```
Request Body For Register Route -
```bash
{
"name":"etc1",
"email": "etc1@gmail.com",
"phoneNumber":"+917449585365",
"password":"etc@1234",
"password":"etc@1234",
}
```
3. **Login User Route** โšก
```bash
POST - http://localhost:3000/api/auth/login
```
Request Body For Login Route -
```bash
{
"email": "etc1@gmail.com",
"password":"etc@1234",
}
```
4. **Get All User Route** โŒจ๏ธ
```bash
GET - http://localhost:3000/api/user/allUsers
```
5. **Get a Single User Route** ๐Ÿ‘ฆ
```bash
GET - http://localhost:3000/api/user/:userId
```
6. **Update User Route** โšก
```bash
PATCH - http://localhost:3000/api/user/:userId
```
Request Body For Update User Route -
```bash
{
"name":"etc2",
"email": "etc2@gmail.com",
"phoneNumber":"+917449585365",
}
```
7. **Delete User Route** ๐Ÿš€
```bash
DELETE - http://localhost:3000/api/user/:userId
```

(back to top)

### Future Works ๐ŸŸฉ
1. **Add .env Package**๐ŸŒŸ
2. **Add cors , rate limiter , helmet , xss , hpp etc Packages**๐ŸŒŸ
3. **Deployment**๐ŸŒŸ

### Puskar Roy ๐Ÿ–‹๏ธ