Added local dev instructions to development.md

This commit is contained in:
Matt Aitken
2022-12-22 12:28:00 +00:00
parent ed3ca90996
commit bdbeea3ae6
+78 -1
View File
@@ -1,6 +1,83 @@
# Initial setup
> **Warning**
> All the following commands should be launched from the **monorepo root directory**
1. Install the dependencies.
```bash
pnpm install
```
2. Environment variables. You will need to create copies of the `.env.example` files in `app/webapp`
```sh
cp ./apps/webapp/.env.example ./apps/webapp/.env
```
Then you will need to fill in the fields with real values.
3. Start postgresql, pulsar, and the pizzly server
```bash
pnpm run docker:db
```
> **Note:** The npm script will complete while Docker sets up the container in the background. Ensure that Docker has finished and your container is running before proceeding.
4. Generate prisma schema
```bash
pnpm run generate
```
5. Run the Prisma migration to the database
```bash
pnpm run db:migrate:deploy
```
6. Run the first build (with dependencies via the `...` option)
```bash
pnpm run build --filter=webapp...
```
**Running simply `pnpm run build` will build everything, including the Remix app.**
7. Run the Remix dev server
```bash
pnpm run dev --filter=webapp
```
## Tests, Typechecks, Lint, Install packages...
Check the `turbo.json` file to see the available pipelines.
- Run the Cypress tests and Dev
```bash
pnpm run test:e2e:dev --filter=webapp
```
- Lint everything
```bash
pnpm run lint
```
- Typecheck the whole monorepo
```bash
pnpm run typecheck
```
- Test the whole monorepo
```bash
pnpm run test
or
pnpm run test:dev
```
- How to install an npm package in the Remix app ?
```bash
pnpm add dayjs --filter webapp
```
- Tweak the tsconfigs, eslint configs in the `config-package` folder. Any package or app will then extend from these configs.
# Running a workflow locally
## After pulling
## After pulling a change
1. Ensure there are no database migrations to run