ICSSC LogoICS Student Council

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:

git clone git@github.com:icssc/anteater-api.git
cd anteater-api

Make a copy of the .env.example.

cp .env.example .env

Install the dependencies.

pnpm i

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:

sha256sum -c db.sql.gz.sha256sum

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:

docker-compose up -d

Start the development server.

pnpm dev

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.

On this page