This example is a NextJS todo app that uses Prisma to store todos in Postgres.
- Prisma
- NextJS
- Postgres
- TypeScript
- Provision a Postgres container on Railway
- Connect to your Railway project with
railway init - Migrate the database
railway run yarn migrate:dev - Run the NextJS app
railway run yarn dev
This app is a simple todo list where the data is persisted to Postgres. Prisma
migrations
can be created with railway run yarn migrate:dev and deployed with railway run yarn migrate:deploy. The Prisma client can be regenerated with
yarn generate.
swr is used to fetch data on the client and perform optimistic updates.