Skip to content

A TypeScript implementation of the ergast f1 api

License

Notifications You must be signed in to change notification settings

StraightOuttaCrompton/ergast-api

Repository files navigation

Ergast api

A TypeScript implementation of the ergast-f1-api using the Ergast Formula One MySQL database developed by Chris Newell.

Based on NJS-ErgastF1API developed by Davide Albiero.

The goal of this project is to be a fast, extensible, and tested implementation with a solid foundation for future growth.

Feel free to explore a deployed example. This is an unstable environment intended for testing, so please do not use for production purposes.

Running locally

Start a the local mysql server

docker compose up

Once the mysql server is started, run the api using

yarn start

Useful commands

Connect to docker my sql instance

docker exec -it mysql-server mysql -u root -p

Then enter database password f1

Remove all docker cache

To rebuild the mysql db from scratch and ensure that no cache remains, use the following (Warning the rebuild will take a while).

docker system prune --all --force
docker compose up