An api to store and retrieve simulations made with lesmevesajudes-ui. Created from a bootstrap to create RESTful APIs with Node.js, Express and Postgres.
NOTE: Now only supports one user. See env variables.
yarn install
psql -f data/reset_simulation_store.sql
You can configure your database connection setting DATABASE_URL
environment variable.
yarn start
**/**Requests.js
: functions and exports.**/routes.js
: endpoints.
This app is configured using the following environment variables:
AUTH_TOKEN
: A token used to query simulation reports. (mandatory to query data)AUTH_USER
: Client userAUTH_PASSWORD
: Client passwordDATABASE_URL
: Where to find postgres database. (mandatory)NODE_ENV
: To force node environment. (development
by default)HOST
: Listen address (0.0.0.0
by default)PORT
: Listen port (3000
by default)
Names can be tuned in src/config.js
.