In this tutorial, our aim is to include:
- HapiJS as the base framework of the project
- Using Postgresql as the database of the project
- Use Joi to validate the parameters
- Use JWT as Authentication method
- Use a custom JWT stored in the form of custom validation method
- Create a session_id that is stored in the JWT
- Implement roles for different paths
- Implement Hapi Swagger for the APIs
- Use Redis to handle the session instead of calling postgresql constantly
- Added ESlint and Prettier to ensure code structure standard
- Introduce Travis CI to compile and run lint ( Free for open source )
- Introduce Circle CI to compile and run lint ( Free tier even with private repo )