Skip to content

Society-for-Internet-Blaseball-Research/datablase

Repository files navigation

Datablase

The SIBR statistics API.

Contributing

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.

Environment

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"

Installation

  1. cd datablase to go into the project root
  2. yarn to install the website's dependencies
  3. npx prisma generate to generate the Prisma query engine binary used by v2 endpoints

Running Locally

  1. yarn dev to start the development server
  2. open http://localhost:3000/ to open the development server

About

The SIBR statistics API.

Resources

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages