PlasticWatch is a platform to crowdsource single-use plastic usage and locate restaurants that offer plastic-free choices.
The steps below will walk you through setting up a development environment.
The website needs a running instance of Observe API. Please refer to the Config files section if the API instance has a different hostname than specified at config/defaults.js.
To prepare OSM data to be loaded as part PlasticWatch, run the script in yarn download --query <path-to-overpass-query>
with queries available in directory utils/overpass-queries. The script takes an Overpass query and dumps GeoJSON FeatureCollection in /tmp/{query-id}.geojson
. This can be directly uploaded to Observe API using the end point POST /osmobjects
.
Requirements:
Clone this repository locally and activate required Node.js version:
nvm install
Install Node.js dependencies:
yarn install
The config files can be found in app/assets/scripts/config
. After installing the project, there will be an empty local.js
that you can use to set the config. This file should not be committed.
Please refer to defaults.js for the available configuration properties.
Start server with live code reload at http://localhost:9000:
yarn serve
Generate a minified build to dist
folder:
yarn build