A sample to play around with pnpM (and eventually Turborepo) monorepos, Prisma with NestJS and Next.js with Refine.
- Node v20.x
- npm v10.x
- pnpM v8.9.0
- Docker Compose
Start by installing:
pnpm installCopy the src/assets/config-template.json file as src/assets/config.json
cp packages/api/src/assets/config-template.json packages/api/src/assets/config.jsonFeel free to edit settings in config.json according to your environment requirements.
If you have a local postgres DB, copy the packages/api/.env.template-local file as packages/api/.env
cp packages/api/.env.template-local packages/api/.envImportant
Feel free to edit settings to match your environment requirements.
To use docker compose for a postgres DB, copy the packages/api/.env.template-compose file as packages/api/.env
cp packages/api/.env.template-compose packages/api/.envthen launch with
docker-compose upPush the database schema with
pnpm run db:pushthen seed with sample data:
pnpm run db:seedTo run unit tests in all workspaces:
pnpm run testTo run e2e tests in all workspaces:
pnpm run test:e2eHTML test reports for your browser are published in packages/*/output.
Tip
Test results are also published as the build summary in Github Actions and a comment in Pull Requests.
pnpm run serverpnpm run clientBrowse http://localhost:3001 and login with:
- username: [email protected]
- password: Test123!