- Node.js.
- Create
.env
file in project root directory with parameters explained in .env configuration or, you can check out example file.env.example
- PostgreSQL database.
- Create database named
Trash
- Run following
.sql
filesapi/db/brute.sql
api/db/country_population.sql
api/db/country_resource.sql
api/db/location_cache.sql
api/db/report_sources.sql
api/db/reports.sql
api/db/resource.sql
api/db/users.sql
- To import demo data from csv, follow api/db/import_data_from_csv.sql.
- Create database named
DB_HOST=change_this_host (DNS or IP of the database server)
DB_PASSWORD=change_this_password (password for the database user)
JWT_SECRET=change_this_secret (secret for JWT authentication)
Optionally you can set following parameters
DB_USER=change_this_username (name of the database user, default: ldiw)
DB_NAME=change_this_db_name (name of the database to connect, default: trash)
DB_PORT=change_this_port (port of the database, default: 5432)
PORT=change_port (port where to run the API, default: 3000)
INTERFACE=change_interface (interface to serve the api on: default 0.0.0.0)
For Trashout import to work, set for one instance following parameter
TRASHOUT_REQ_DELAY= Cron expression when to run import.
npm install
npm run start-dev
To manually deploy to Azure look at manual_deploy_to_live.txt