Role-Based Access Control (RBAC) - Test
- Basic Auth
- Roles [ admin , user ]
- Administrators can write , update, and delete a single blog and also create a user
- User can read and write a blog
Postman: See documentation
Auth
POST /api/v1/auth/login
Blog
POST /api/v1/blogs
GET /api/v1/blogs
GET /api/v1/blogs/:blogId
DELETE /api/v1/blogs/:blogId
PATCH /api/v1/blogs/:blogId
- Node Js
- Typescript
- Express
- MongoDB
- Jest
- Postman
git clone https://github.com/mr-chidex/RBAC.git
cd RBAC
- Create a file named
.env
in the project root directory - Add the environment variables as described in the
env.example
file
yarn install
yarn dev