The SIBR statistics API.
Please feel free to open PRs adding new calculations to this project! The schema for the database can be found here.
When adding an API endpoint, you must document it using the JSDoc-like syntax recognized by express-swagger-generator so that the API docs are updated.
Datablase requires some environmental variables to be set. A list of these variables can be found below. They can be set manually, or placed in a .env
file.
SIBR_API_SCHEME=http
PGUSER=dbuser
PGHOST=database.server.com
PGPASSWORD=secretpassword
PGDATABASE=mydb
PGPORT=3211
DATABASE_URL="postgresql://username:password@localhost:5432/database?schema=data"
cd datablase
to go into the project rootyarn
to install the website's dependenciesnpx prisma generate
to generate the Prisma query engine binary used by v2 endpoints
yarn dev
to start the development serveropen http://localhost:3000/
to open the development server