A simple repository for managing user roles and permissions through APIs using Node.js and MongoDB.
- Role-based Authentication: Implement secure authentication based on user roles, ensuring that users have appropriate access levels.
- Permission Management: Define and manage granular permissions to control user actions and access within the application.
- User Management API Endpoints: Explore a variety of API endpoints for effective user management, allowing operations such as user creation, deletion, and retrieval.
- Post and Post Category: A newly added feature includes post and post category management, expanding the functionality of the application.
-
Clone the repository:
git clone https://github.com/vickypandey14/User-Roles-and-Permissions-APIs-in-Node-JS-MongoDB.git
-
Install dependencies:
cd User-Roles-and-Permissions-APIs-in-Node-JS-MongoDB npm install
Create an .env
file based on the provided .env.example
. This file should contain your sensitive information, such as database credentials and any other environment variables required. Ensure that the .env
file is not committed to version control.
-
Set up your MongoDB database and configure the connection in the project. Ensure that the MongoDB server is running and accessible. Modify the configuration files for database connection and environment variables.
-
Run the application:
nodemon index
-
Explore the API endpoints and customize as needed.
Feel free to contribute to this project. Fork the repository, make your changes, and submit a pull request.