This project is a template for creating a REST API with built-in features such as authentication, pagination, and session token management.
common/: Contains utility functions likesuccessRes()for sending successful responses.config.js: The configuration file for the project.controllers/: Contains controller files likeuser.jsfor handling user-related requests.db/: Contains files related to database connection (connexion.js) and models (model/user.js).services/: Contains service files likeuserService.js,hashingService.js, andverifyToken.jsfor user management, password hashing, and token verification respectively.test/: Contains test files likeendpoint.test.jsfor testing the API endpoints.
- User Authentication: Users can sign up, log in, and log out. Authentication is handled using JWT tokens.
- Logging with winston
- Pagination: The API supports pagination for handling large amounts of data.
- Session Token Management: The API manages session tokens for logged-in users.
- Emailing Service: An emailing service will be added to send emails to users for various notifications.
- Enhanced Security: More security features will be added to protect user data and prevent unauthorized access, better management jwt.
- Implementation openApi swagger
To run this project, use the following command:
npm start