Skip to content
abdelelbouhy edited this page Jun 3, 2018 · 28 revisions

Shipserv Coding Challenge

React app to display data to the user about bookings, itineraries, and other important info.


Getting started

Node version

The project is meant to be run on Nodejs 8.

Use NVM to install and manage multiple versions of nodeJS.

If NVM is running on your machine please skip the next step.

  1. install nvm curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash

Or

wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash

Then

export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"


  • nvm list - List your installed versions
  • nvm install 8 - Install (And use) a version
  • nvm use - Use the version specified in the project .nvmrc file

Dependencies

Install the npm dependencies as follow


npm install

Npm Scripts

During the normal development

Local execution
  • npm run start-dev Build the front end and rebuild on every change
Testing
  • npm run test Run the front end tests

To run the test with watch mode run npm run test -- --watch

Or you can skip all the above and.

  1. At the root folder run ./install.sh

This shell script will install node version 8, the rquired npms, run the build

npm run start-dev runs webpack-dev-server and serve to localhost:8080