The document management systems manages users, user roles, and the document the users create
- Clone or Download the project.
- Open the command line and cd into the folder.
- Install dependencies
npm install. - You can install nodemon and run the
nodemoncommand to run it or just type innode server.js. - Run test
npm test.
- Login with the route '/api/users/login' using the 'admin' as username and password.
- You can use the following routes:
-
'/api/users'
- GET retrieves all the users.
- POST creates a new user.
-
'/api/users/:id'
- GET returns a specific user with same id.
- PUT updates a specific user with new details.
- DELETE deletes a specific user.
-
'/api/users/login'
- POST logs in a user.
-
'/api/users/logout'
- POST logs out a user
-
'/api/users/:id/documents'
- GET retrieves document created by the user
-
'/api/documents'
- GET retrieves all documents in the system
- POST creates a new document
-
'/api/documents/:id'
- GET retrieves a document with same matching id.
- PUT updates document with new details
- DELETE deletes a particular document from the system
-
'/api/roles'
- GET retrieves all roles.
- POST create new role.
-
'/api/roles/:id'
- GET retrieves specific role.
- PUT update the role with new details
- DELETE deletes the role using the id.
-