This repo contains some basic apis which does the following functionalities -
- Authenticate user with JWT token
- Use multer to input csv file and stores it into mongodb
- Clone the project by
git clone https://github.com/Pratham-19/restapi.git
- Make an env file and add your mongodb and jwt_secret_key
//In .env
PORT = 'Any Port...'
MONGO_ATLAS_PW= 'Your Mongodb Key...'
JWT_KEY = 'Your jwt private key...'
- Install packages
npm install
- Run server
npm start
1.1 Creating new User using bcrpyt
1.2 Login with help of bcrpyt & jwt
Entering wrong password
1.3 Authenticating (valid for 1h can change in code )
1.4 See all users (only authenticated users can see)
1.4 Delete user (Authentication required)
2.1 Uplaoding file and stroing the results in mongodb with email and linkein validation using regex (only authenticated users)
In database