Create a Restful API for CRUD application using expressJs framework that has following features.
- Logged in users can create, delete and update their article.
- Public user can read the article.
It should show the following implementation:
- Run in multi thread of CPU.
- Caching and cache invalidation using Redis.
- Implement Oauth with JWT.
- Use local dynamodb.
- Use ES6 and async await.
Notes:
- Should share code in github with proper commits history.
- Should have a readme.md file with instruction to run in other computer.
- Should share a migration script for dynamodb such that the tables can be created in other hosts.
- Clone Repository
- Configure
.env
inapp
&server
. - Build and run application with
docker-compose up
.
- Change the permissions of
docker/dynamodb
volume.eg: chmod -R 777 docker/dynamodb
. - Manually run the migration with:
docker exec -it <codeassignment:server container id> sh
npm run migrate --dir=src
- Clone Repository
- Configure
.env
inapp
&server
. - Build and run application with
docker-compose -f ./docker-compose.prod.yml up
.
- Change the permissions of
docker/dynamodb
volume.eg: chmod -R 777 docker/dynamodb
. - Manually run the migration with:
docker exec -it <codeassignment:server container id> sh
npm run migrate --dir=dist
https://hub.docker.com/r/kritishdhaubanjar/codeassignment/tags
1.docker-compose -f ./docker-compose.hub.yml up
.
2. Change the permissions of docker/dynamodb
volume. eg: chmod -R 777 docker/dynamodb
.
3. Manually run the migration with:
docker exec -it <codeassignment:server container id> sh
npm run migrate --dir=dist