-
git clone rep
-
git switch < last branch >
-
rename .env.example => .env
-
npm i
-
if you want to use your db - add to .env file enviroment data for your db
-
if you want to use my db - download docker app and start it, then use $ npm run start-docker-db
-
start rest server with $ npm run start
- if you use my db in docker container you can connect to pgadmin4 by the url: http://localhost:8080/browser/
Write a simple REST service with CRUD operations for User entity.
Add server-side validation for create/update operations of User entity.
Configure your REST service to work with PostgreSQL.
The service should adhere to 3-layer architecture principles.
Add Group entity to already existing REST service with CRUD operations.
Link User records in one table with Group.
Add addUsersToGroup(groupId, userIds)method which will allow adding users to a certain group. Use transactions to save records in DB.
Add middleware which will log which service method has been invoked and which arguments have been passed to it.
Add error handling to process.on(‘uncaughtException’,...). Add Unhandled promise rejection listener to log errors.
Every method in the controllers should log the errors.
Add authorization to the already existing REST service.
Add CORS middleware to access service methods from WEB applications hosted on another domains.
Add unit tests for User and Group entities controllers methods using Jestlibrary.