/sierra-charlie

Primary LanguageJavaScriptOtherNOASSERTION

sierra-charlie

License CLA assistant CircleCI Dependencies status

Usage

This project does not include input files. These input files describe the network you wish to visualise, i.e. the roads and junctions. These are required inside the json folder. The schema for these files is found in the json-schema directory.

Easy way - build and run with Docker

This projects come with a Dockerfile which enables the automation of image creation.

cd sierra-charlie

docker build -t "sierra-charlie:latest" .

docker run -ti -p 3000:3000 "sierra-charlie:latest" /bin/bash

$npm start

Point your browser to localhost:3000

Hard way - installing dependencies

Portions of the code are written in PureScript and Elm. Compilers for both languages and the Node.js runtime must be installed on the local machine.

The project is developed on OS X, but may support other UNIX platforms. On OS X, system-level dependencies should be installed with the brew tool.

brew install node purescript

Webpack is used to structure the project, supporting development and production mode builds. ES2015 syntax is translated to JavaScript using Babel. Code quality is monitored using JSHint.

Use yarn tool to install project-level dependencies.

This project was built for elm version 0.16. yarn may be used to install this

yarn add elm@0.16.0

Use yarn to install packages. If you don't have yarn, install it using npm install -g yarn.

yarn install

You will also need to increase the kernel limits on OS X.

sudo bash -c 'echo "kern.maxfiles=65536" >>/etc/sysctl.conf'
sudo bash -c 'echo "kern.maxfilesperproc=65536" >>/etc/sysctl.conf'
echo "ulimit -n 65536" >>~/.bash_profile

This may require you to restart your computer.

Building the project

The same npm tool is also used to build the project, and to simplify other project-related tasks.

To build the project, give the following command:

npm run build

If the build is successful, the project is ready to run. In one session, start a local CORS proxy:

npm run start-proxy

In another session, start a local HTTP server:

npm start

Finally, navigate to the following address in a web browser:

http://localhost:3000