This is a AUTH API with JWT (JSON Web Token) authentication. It allows users to sign up and sign and get JWT for further resource access.
- User sign up with password hashing using bcrypt
- User sign in with JWT authentication
- Integration with MongoDB using Mongoose
- Node.js installed on your machine
- MongoDB database for storing user data
-
Clone the repository:
git clone https://github.com/Sushil787/NodeJs-TypeScript-Auth-API.git
-
Create a
.env
file in the project root folder. -
Add the following environment variables to the
.env
file:
- DB_URL=your DB url
- SECRET_KEY =lsdfasdfjslf8082302ljslf
- PORT=8080
npm install
npm start
SIGNUP Method: POST localhost:port/signup
SIGNIN Method: POST localhost:port/signin