Public | Automated Build

Last pushed: 2 months ago
Short Description
Code Challenge for kauf DA
Full Description

Code Challenge for kauf DA

challenge

prepare

At first you should install node and npm
Tested on Node 6.9.1

for prod mode

  • npm install
  • npm run build
  • npm run start or npm run start-with-mongo (mongodb should be started before and serve requests on port 27017)
  • go to localhost:8080

for dev mode

  • npm install
  • npm run start-dev or npm run start-dev-with-mongo (mongodb should be started before and serve requests on port 27017)
  • go to localhost:8080

Database

DB Server will serve requests on port 3000

  • JSON-Server: currently is used JSON-Server for store data. To manual start - npm run start-json-server
  • MongoDB:
    1. Pull mongo docker image from DockerHUB docker pull mongo
    1. Start mongo server npm run mongo
    1. Start server to work with mongo server npm run start-mongo-server and serve requests on port 3000

docker

  • build docker build -t kengurukleo/kaufda-js-code-challenge .
  • or you can just pull latest image from docker hub docker pull kengurukleo/kaufda-js-code-challenge and than run it
  • run docker run -p <port-to-expose>:8080 -d kengurukleo/kaufda-js-code-challenge

unit tests

  • for unit tests run npm run tests

coverage

Docker Pull Command
Owner
kengurukleo

Comments (0)