Name: majicbox
Owner: unicef
Description: null
Created: 2016-02-25 23:39:59.0
Updated: 2017-05-26 23:10:39.0
Pushed: 2017-02-18 02:57:13.0
Homepage: null
Size: 19718
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
![image](https://travis-ci.org/unicef/majicbox.svg?branch=master Travis CI build status)
This application uses Mongodb for its database. You will need to have it installed to use it. Check out the Mongodb installation information at:
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/
https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-16-04
git clone git@github.com:mikefab/majicbox.git
cd majicbox
npm install
make setup-dev-data
node lib/import/admin.js -c col -a 2 -s santiblanko`
nohup node lib/import/amadeus_mobility.js nohup.out >&1& `
NODE_ENV=development nodemon server.js 8000
Deprecated:
export AZURE_STORAGE_ACCOUNT=zika1093 AZURE_STORAGE_ACCESS_KEY=....
. For security reasons, we don't distribute keys with the repository; ask around.node lib/blob-sync/download-from-azure.js
.eslintrc
for our deviations). Code should completely
pass eslint
(see Linting section below).Before submitting any code, one should run:
mocha
to ensure all tests pass.make lint
for style checks.It's a little slower (container overhead) but you can run make lint utest-in-docker
to run the same commands as Travis CI. This should eliminate any local state you may have hanging around. We now have checks on every pull request, which is great because we should never have our master
branch breaking tests.
Code should ideally pass eslint
. We use the Google style guide as a base
configuration with some slight modifications. The .eslintrc
is committed to
the repo, so whenever you run make lint
, the config should take effect.
nodemon
is like node
, but automatically reloads code when the code is
updated.
install -g nodemon
_ENV=development nodemon server.js 8002
This process requires the GDAL - Geospatial Data Abstraction Library
(On Mac OSX: brew install gdal)
ogr2ogr -f GeoJSON admin2.json country-code_adm2.shp
mkdir ./data/geojson/co
node lib/import/admin.js -f './data/geojson/br/admin2.json' -c 'co' --verbose true
node lib/import/admin.js -s 'gadm2-8' -c 'arg' -a 2 --verbose true