Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/2color/next-prisma-incremental
A demo showing how to leverage next.js incremental generation
https://github.com/2color/next-prisma-incremental
jamstack next prisma
Last synced: 15 days ago
JSON representation
A demo showing how to leverage next.js incremental generation
- Host: GitHub
- URL: https://github.com/2color/next-prisma-incremental
- Owner: 2color
- Created: 2020-11-24T12:12:47.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T20:26:11.000Z (11 months ago)
- Last Synced: 2024-10-10T08:30:53.840Z (26 days ago)
- Topics: jamstack, next, prisma
- Language: TypeScript
- Homepage: https://next-prisma-incremental.vercel.app/
- Size: 335 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Jamstack with Prisma and Next.js - Incremental Static-Regeneration
This is an example blog app showing how to work with Prisma in Next.js.
The blog compares the two rendering approaches that Next.js supports – **static generation with incremental static re-generation** and **server-side rendering** for post pages.
## Installation
Clone the repo and install the dependencies:
```bash
# with npm
npm i
```
## Start the database```bash
docker-compose up -d
```## Set DATABASE_URL
Create `prisma/.env`
```bash
touch prisma/.env
```And add the following to the file
```
DATABASE_URL="postgresql://test-user:test-password@localhost:5432/my-blog?schema=public"
```## Create the database
```bash
npx prisma db push --preview-feature
```## Run the App
```bash
# with npm
npm run dev
```## License
MIT