Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hojberg/railway-test
https://github.com/hojberg/railway-test
Last synced: 29 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/hojberg/railway-test
- Owner: hojberg
- Created: 2023-03-28T20:45:55.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-03-28T20:45:58.000Z (over 1 year ago)
- Last Synced: 2024-04-08T16:43:38.624Z (7 months ago)
- Language: TypeScript
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
---
title: NextJS Prisma
description: A NextJS app using Prisma with a PostgreSQL database
tags:
- next
- prisma
- postgresql
- typescript
---# 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.[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template/HRZqTF)
## ✨ Features
- Prisma
- NextJS
- Postgres
- TypeScript## 💁♀️ How to use
- [Provision a Postgres container on Railway](https://dev.new)
- Connect to your Railway project with `railway link`
- 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.