Setting Up
How to set up a local Anteater API environment to contribute
Thank you for your interest in contributing to Anteater API!
✅ Getting Started
🛠️ Prerequisites
- For Windows users: A Windows Subsystem for Linux instance
- A Node.js environment
- pnpm, a blazingly fast package manager for Node.js
- nvm, a version manager for Node.js
- Docker Compose for running the local database server, or an already running PostgreSQL server
- Optionally: PostgreSQL version 16, for generating database dumps
🧑💻 Setting Up
Clone the repository and change into it. In your command line:
Make a copy of the .env.example
.
Install the dependencies.
Download the latest version of the database dump here, and move it into the packages/db
directory.
Optional: Verify the integrity of the database dump.
To do this, download the checksum here, move it into the packages/db
directory, then run the following command:
If the checksum does not match, the database dump may be corrupt or have been tampered with. You should delete it immediately and try downloading it again.
Start the local Postgres database. If you are using Docker Compose, as we recommend above, this is simple:
Start the development server.
The process of database seeding (importing data from the database dump) can take a while. If at first this fails, wait a few minutes before trying again.
The development server will automatically reload upon any changes to the codebase. This will aid in your testing.