OpenERZ is an open API to the data of the Entsorgung und Recycling Zürich (ERZ)
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
csv
images/mongodb
json
lib
public
test
.dockerignore
.env.dist
.gitignore
.jscsrc
.jshintrc
.travis.yml
CHANGELOG.md
Dockerfile
LICENSE.md
Procfile
README.md
Vagrantfile
docker-compose.yml
gulpfile.js
index.js
loadData.js
package.json

README.md

Build Status

Installation

To setup the whole environment there is a docker setup. All you have to do to run it is:

  1. Install Docker
  2. git clone git@github.com:metaodi/openerz.git
  3. Clone this repo
  4. Copy .env.dist to .env
  5. Run docker-compose up on your command line

Then open http://localhost:9999/doc (or whatever port you specified in your .env file)

Testing

docker-compose exec openerz sh -c "npm test"

Update data

Each year, ERZ will release the new waste collection data. The loadData.js script is used for that (run it in the container):

docker-compose exec openerz sh -c "node loadData.js"

To update the data that is used on the production version, make sure you run the loadData.js script with the correctly set MongoDB URL:

MONGOLAB_URI='mongodb://<dbuser>:<dbpassword>@dsXXXXX.mongolab.com:63630/heroku_appXXXX' node loadData.js

You can find the URI with the following heroku command:

heroku run env --app openerz

Release

To create a new release follow these steps:

  1. Update the version number in package.json
  2. Update the CHANGELOG.md
  3. Create a new release/tag on GitHub

The new tag on GitHub triggers a build on TravisCI, which deploys the application to heroku (http://openerz.herokuapp.com).

Credits

Logo

The logo was created by sagit milshtein from the Noun Project (CC-BY 3.0)