- Windows, Mac, Linux system
- Approx
200MB
of free disk space - At least
1.8GB
free memory 2
core CPU is recommendednode.js >= 8.6
- Either of:
docker
orpostgresql >= 10
withpostgis >= 2
extensions.
Follow these steps to create a full local development environment (this is probably the quickest way to start from scratch):
- Install fairly recent node.js git and Docker.
- Start PostgreSQL with PostGIS
docker run --env POSTGRES_PASSWD=pgpassword --name postgis -dit --restart unless-stopped -p 5432:5432 geographica/postgis:quick_quail
- Pull the data from repo
git clone [email protected]:openaq/openaq-fetch.git
- Install dependencies
cd openaq-fetch && npm install
- Create a user and db in postgres in
docker exec -ti postgis psql -U postgres
CREATE ROLE openaq WITH LOGIN PASSWORD 'openaq-pass';
CREATE DATABASE "openaq-local" OWNER openaq;
\connect "openaq-local"
CREATE EXTENSION postgis;
\quit
- Create a local knexfile
cp knexfile.js knexfile-local.js && editor knexfile-local.js
And you're set.