https://github.com/shunkakinoki/nextjs-prisma
https://github.com/shunkakinoki/nextjs-prisma
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/shunkakinoki/nextjs-prisma
- Owner: shunkakinoki
- Created: 2021-03-22T21:54:32.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-22T21:54:35.000Z (about 4 years ago)
- Last Synced: 2025-03-06T21:58:02.826Z (2 months ago)
- Language: TypeScript
- Size: 47.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NextJS Prisma Example
This example is a [NextJS](https://nextjs.org/) todo app that uses
[Prisma](https://www.prisma.io/) to store todos in Postgres.[](https://railway.app/new?template=https%3A%2F%2Fgithub.com%2Frailwayapp%2Fexamples%2Ftree%2Fmaster%2Fexamples%2Fnextjs-prisma&plugins=postgresql)
## ✨ Features
- Prisma
- NextJS
- Postgres
- TypeScript## 💁♀️ How to use
- [Provision a Postgres container on Railway](https://dev.new)
- Connect to your Railway project with `railway init`
- Migrate the database `railway run yarn migrate:dev`
- Run the NextJS app `railway run yarn dev`## 📝 Notes
This app is a simple todo list where the data is persisted to Postgres. [Prisma
migrations](https://www.prisma.io/docs/concepts/components/prisma-migrate#prisma-migrate)
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](https://swr.vercel.app/) is used to fetch data on the client and perform optimistic updates.