Make env file and run PostgreSQL by using Docker.
% docker-compose up -d
Install Node.js modules.
% yarn install
Migrate PostgreSQL schemas.
% yarn prisma db push
Run your app in the development mode.
% yarn dev
Open http://localhost:3000 with your browser to see the result.
Ensure the .env.local
file has required environment variables:
DATABASE_URL="postgresql://postgres@localhost:5432/app"
POSTGRES_HOST_AUTH_METHOD=trust
Ensure the .env.test.local
file has required environment variables:
DATABASE_URL="postgresql://postgres@localhost:5432/test"
Runs your tests using Jest.
% yarn test
Blitz comes with a test setup using Jest and react-testing-library.
Read the Blitz.js Documentation to learn more.