This is a Bearer Token authentication API built with NodeJS, express and Typescript.
It has the following features
- User CRUD
- User Login
- Access and Refresh Token
- Authentication Middleware
- Password Recovery
- Sending emails via Nodemailer
- HTML template emails
- Postgres Sequelize
-
Yarn Package Manager installed. Yarn can be installed using the command below:
npm install --global yarn
clone the repository and navigate to the project directory
git clone https://github.com/maxwellwachira/auth_nodejs_typescript.git
cd auth_nodejs_typescript/
Check package.json file and ensure scripts are notated as below:
"scripts": {
"build": "npx tsc",
"start": "node dist/index.js",
"dev": "concurrently \"npx tsc --watch\" \"nodemon -q dist/index.js\""
},
Delete the node_modules folder and any 'lock' files such as yarn.lock or package-lock.json if present.
Run yarn install to install project dependencies
yarn install
final step
npm run dev
Special thanks to Nodemailer team