Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vincenthuang75025/places
https://github.com/vincenthuang75025/places
Last synced: 21 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/vincenthuang75025/places
- Owner: vincenthuang75025
- Created: 2024-01-14T19:21:30.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-01-29T00:34:22.000Z (10 months ago)
- Last Synced: 2024-01-29T22:53:14.726Z (10 months ago)
- Language: JavaScript
- Size: 430 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
---
name: Vercel Postgres + Prisma Next.js Starter
slug: postgres-prisma
description: Simple Next.js template that uses Vercel Postgres as the database and Prisma as the ORM.
framework: Next.js
useCase: Starter
css: Tailwind
database: Vercel Postgres
deployUrl: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fstorage%2Fpostgres-prisma&project-name=postgres-prisma&repository-name=postgres-prisma&demo-title=Vercel%20Postgres%20%2B%20Prisma%20Next.js%20Starter&demo-description=Simple%20Next.js%20template%20that%20uses%20Vercel%20Postgres%20as%20the%20database%20and%20Prisma%20as%20the%20ORM.&demo-url=https%3A%2F%2Fpostgres-prisma.vercel.app%2F&demo-image=https%3A%2F%2Fpostgres-prisma.vercel.app%2Fopengraph-image.png&stores=%5B%7B"type"%3A"postgres"%7D%5D
demoUrl: https://postgres-prisma.vercel.app/
relatedTemplates:
- postgres-starter
- postgres-kysely
- postgres-sveltekit
---# Vercel Postgres + Prisma Next.js Starter
Simple Next.js template that uses [Vercel Postgres](https://vercel.com/postgres) as the database and [Prisma](https://prisma.io/) as the ORM.
## Demo
https://postgres-prisma.vercel.app/
## How to Use
You can choose from one of the following two methods to use this repository:
### One-Click Deploy
Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=vercel-examples):
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fstorage%2Fpostgres-prisma&project-name=postgres-prisma&repository-name=postgres-prisma&demo-title=Vercel%20Postgres%20%2B%20Prisma%20Next.js%20Starter&demo-description=Simple%20Next.js%20template%20that%20uses%20Vercel%20Postgres%20as%20the%20database%20and%20Prisma%20as%20the%20ORM.&demo-url=https%3A%2F%2Fpostgres-prisma.vercel.app%2F&demo-image=https%3A%2F%2Fpostgres-prisma.vercel.app%2Fopengraph-image.png&stores=%5B%7B"type"%3A"postgres"%7D%5D)
### Clone and Deploy
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [pnpm](https://pnpm.io/installation) to bootstrap the example:
```bash
pnpm create next-app --example https://github.com/vercel/examples/tree/main/storage/postgres-prisma
```Once that's done, copy the .env.example file in this directory to .env.local (which will be ignored by Git):
```bash
cp .env.example .env.local
```Then open `.env.local` and set the environment variables to match the ones in your Vercel Storage Dashboard.
Next, run Next.js in development mode:
```bash
pnpm dev
```Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=vercel-examples) ([Documentation](https://nextjs.org/docs/deployment)).
## Logging stuff
Install pnpm with npm
npm install -g pnpm
Start server
pnpm run dev
Create .env file (ask for vars)
source ~/.zshrc or whatever if pnpm is missing stuff
pnpm prisma generate
migration example: https://vercel.com/docs/storage/vercel-postgres/using-an-orm#prisma-migrate
pnpm prisma migrate dev --name init
prisma cli: https://www.prisma.io/docs/orm/tools/prisma-cli
getting started: https://www.prisma.io/docs/orm/prisma-migrate/getting-started
vercel prisma integration using an orm: https://vercel.com/docs/storage/vercel-postgres/using-an-orm#prisma
prisma deploy to vercel: https://www.prisma.io/docs/orm/prisma-client/deployment/serverless/deploy-to-vercel