mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
Merge branch 'main' of github.com:stackframe-projects/stack
This commit is contained in:
commit
0520250438
16
README.md
16
README.md
@ -34,10 +34,12 @@ npm install @stackframe/stack
|
||||
|
||||
For setup, refer to [our documentation](https://docs.stackframe.co).
|
||||
|
||||
## Development Setup
|
||||
## Development
|
||||
|
||||
This is for you if you want to contribute to the Stack project.
|
||||
|
||||
### Setup
|
||||
|
||||
Make sure you have `pnpm` installed alongside Node v20. Next, ensure you created `.env.local` files by copying `.env` in each of the subpackages in the `packages` folder and filling out the variables. You will need to start a Postgres database; you can do this with the following command:
|
||||
|
||||
```sh
|
||||
@ -53,7 +55,9 @@ pnpm install
|
||||
pnpm run codegen
|
||||
|
||||
# After starting a Postgres database and filling the corresponding variables in .env.local, push the schema to the database:
|
||||
pnpm run prisma:server -- db reset
|
||||
# for production databases, use `deploy` instead. See: https://www.prisma.io/docs/orm/prisma-migrate/understanding-prisma-migrate/mental-model#prisma-migrate-in-a-staging-and-production-environment
|
||||
pnpm run prisma:server -- migrate reset
|
||||
|
||||
|
||||
# Start the dev server
|
||||
pnpm run dev
|
||||
@ -64,3 +68,11 @@ You can also open Prisma Studio to see the database interface and edit data dire
|
||||
```sh
|
||||
pnpm run prisma:server -- studio
|
||||
```
|
||||
|
||||
### Database migrations
|
||||
|
||||
If you make changes to the Prisma schema, you need to run the following command to create a migration:
|
||||
|
||||
```sh
|
||||
pnpm run prisma:server -- migrate dev
|
||||
```
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
"build:server": "turbo run build --no-cache --filter=@stackframe/stack-server...",
|
||||
"clean": "turbo run clean --no-cache && rimraf node_modules",
|
||||
"codegen": "turbo run codegen --no-cache",
|
||||
"psql:server": "pnpm run --filter=@stackframe/stack-server psql",
|
||||
"prisma:server": "pnpm run --filter=@stackframe/stack-server prisma",
|
||||
"dev": "turbo run dev --parallel --continue",
|
||||
"dev:app": "turbo run dev --continue --filter=@stackframe/dev-app...",
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
"analyze-bundle": "npm run todo; ANALYZE_BUNDLE=1 npm run build",
|
||||
"start": "npm run todo; next start",
|
||||
"codegen": "npm run todo; npm run prisma -- generate",
|
||||
"psql": "npm run todo; npm run with-env -- bash -c 'psql $DATABASE_CONNECTION_STRING'",
|
||||
"prisma": "npm run todo; npm run with-env -- prisma",
|
||||
"email": "email dev --port 3001 --dir src/email/templates",
|
||||
"lint": "npm run todo; next lint",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user