Skip to content

Example application implementing Express, DynamoDB, Redis & multi-threading.

Notifications You must be signed in to change notification settings

kritish-dhaubanjar/express-dynamodb-redis

Repository files navigation

Coding Assignment [Express, DynamoDB, Redis]

Description

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.

Development Setup

  1. Setup Node Server
  2. Setup React App

Deployment Setup with Docker (Development)

  1. Clone Repository
  2. Configure .env in app & server.
  3. Build and run application with docker-compose up.

image

image

  1. Change the permissions of docker/dynamodb volume. eg: chmod -R 777 docker/dynamodb.
  2. Manually run the migration with:
docker exec -it <codeassignment:server container id> sh
npm run migrate --dir=src

Deployment Setup with Docker (Production)

  1. Clone Repository
  2. Configure .env in app & server.
  3. Build and run application with docker-compose -f ./docker-compose.prod.yml up.

image

image

  1. Change the permissions of docker/dynamodb volume. eg: chmod -R 777 docker/dynamodb.
  2. Manually run the migration with:
docker exec -it <codeassignment:server container id> sh
npm run migrate --dir=dist

Deployment Setup with Docker (Docker Hub)

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

About

Example application implementing Express, DynamoDB, Redis & multi-threading.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published