For general guidelines on contributing to the projects under ZK Email, see the Contributing page for ZK Email.
- Node.js
- pnpm (install with
npm install --global pnpm
) - A PostgreSQL database
Install dependencies
pip3 install prisma
prisma generate
pnpm install
Copy .env.example
to .env
Edit .env
and configure POSTGRES_PRISMA_URL
and POSTGRES_URL_NON_POOLING
to point to your PostgreSQL database. See below for an example setup of PostgreSQL on Ubuntu.
Initialize the database
pnpm prisma migrate dev
Start the development server
pnpm dev
Navigate to http://localhost:3000 in your browser. If everything is set up correctly, you should see the DKIM Archive website and be able to search for any of the domains created by the seed script, for example example.com
.
Install PostgreSQL server and client with sudo apt install postgresql
Log in with sudo -u postgres psql
and set a password with \password postgres
Test the login: psql postgresql://postgres:YOURPASSWORD@localhost
Update your .env
file:
POSTGRES_URL_NON_POOLING="postgresql://postgres:YOURPASSWORD@localhost/dkim_lookup"
POSTGRES_PRISMA_URL="postgresql://postgres:YOURPASSWORD@localhost/dkim_lookup"
To manage the database via Prisma, run pnpm prisma
followed by the Prisma command. For example pnpm prisma migrate status
. See the Prisma CLI reference for the full list of commands.
Run the unit tests
pnpm vitest --run