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. ๐
- Host: GitHub
- URL: https://github.com/puskar-roy/nestjs_api
- Owner: Puskar-Roy
- Created: 2023-12-17T14:32:32.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-18T14:07:07.000Z (over 2 years ago)
- Last Synced: 2025-03-06T08:57:13.897Z (over 1 year ago)
- Topics: authentication, nestjs, postgresql, restapi, typeorm, typescript
- Language: TypeScript
- Homepage:
- Size: 323 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
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
```
## 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
```
### Future Works ๐ฉ
1. **Add .env Package**๐
2. **Add cors , rate limiter , helmet , xss , hpp etc Packages**๐
3. **Deployment**๐
### Puskar Roy ๐๏ธ