Skip to content

Commit 5fa41c8

Browse files
committed
fix: Seed the DB after an install
1 parent d3e8084 commit 5fa41c8

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,30 @@
66

77
> Made with [MUI's](https://mui.com/) components, [React](https://reactjs.org/) and [create-react-app](https://facebook.github.io/create-react-app/).
88
9-
## Local development
9+
## How to use
10+
11+
- Create a new project from this template
12+
13+
![](https://i.imgur.com/Hc0JsXs.png)
1014

1115
- Copy `.env.sample` to `.env` and adapt the database URL
1216

1317
- Install dependencies: `npm i` (This should also setup your database from the `schema.prisma` file and the migrations)
1418

1519
- Start both the server and the client with `npm run dev`
1620

21+
### How to sync your database with your new Prisma schema
22+
23+
- Run `npm run db:sync:dev`
24+
25+
### How to seed your database
26+
27+
- Run `npm run db:seed`
28+
1729
## Deployment
1830

31+
*This project should deploy successfully as-is on Heroku*
32+
1933
- Set the DATABASE_URL environment variable
2034

2135
- Install dependencies: `npm ci` (This should also setup your database from the `schema.prisma` file and the migrations)

postInstall.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
if [ "$NODE_ENV" = "production" ]; then
22
npm run db:sync:prod
3+
npm run db:seed
34
npm run build --workspace=client
45
else
56
npm run db:sync:dev
7+
npm run db:seed
68
fi

0 commit comments

Comments
 (0)