diff --git a/ai/aws-bedrock/chatbot-nextjs/README.md b/ai/aws-bedrock/chatbot-nextjs/README.md index ff46990..5176a9e 100644 --- a/ai/aws-bedrock/chatbot-nextjs/README.md +++ b/ai/aws-bedrock/chatbot-nextjs/README.md @@ -1,4 +1,4 @@ - + ## AI Chatbot (AWS Bedrock) diff --git a/deploy-with-cloudflare-pages/README.md b/deploy-with-cloudflare-pages/README.md index 5e1e00e..bfaf380 100644 --- a/deploy-with-cloudflare-pages/README.md +++ b/deploy-with-cloudflare-pages/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Cloudflare Pages diff --git a/deploy-with-cloudflare-workers/README.md b/deploy-with-cloudflare-workers/README.md index a453d83..69b1a27 100644 --- a/deploy-with-cloudflare-workers/README.md +++ b/deploy-with-cloudflare-workers/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Cloudflare Workers diff --git a/deploy-with-deno/README.md b/deploy-with-deno/README.md index ed6ba6e..35bd4fa 100644 --- a/deploy-with-deno/README.md +++ b/deploy-with-deno/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Deno diff --git a/deploy-with-heroku/README.md b/deploy-with-heroku/README.md index 32f813e..03ca477 100644 --- a/deploy-with-heroku/README.md +++ b/deploy-with-heroku/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Heroku diff --git a/deploy-with-netlify-functions/README.md b/deploy-with-netlify-functions/README.md index 218ce52..aba4383 100644 --- a/deploy-with-netlify-functions/README.md +++ b/deploy-with-netlify-functions/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Netlify functions diff --git a/deploy-with-railway/README.md b/deploy-with-railway/README.md index c0f30ca..a50f433 100644 --- a/deploy-with-railway/README.md +++ b/deploy-with-railway/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Railway diff --git a/deploy-with-render/README.md b/deploy-with-render/README.md index 347d886..7105df8 100644 --- a/deploy-with-render/README.md +++ b/deploy-with-render/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Render diff --git a/with-analog/README.md b/with-analog/README.md index 022e809..6f10438 100644 --- a/with-analog/README.md +++ b/with-analog/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Analog diff --git a/with-angular/README.md b/with-angular/README.md index 07008d2..ef9ca27 100644 --- a/with-angular/README.md +++ b/with-angular/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Angular diff --git a/with-astro-api-routes/README.md b/with-astro-api-routes/README.md index dd53b51..a1b72de 100644 --- a/with-astro-api-routes/README.md +++ b/with-astro-api-routes/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Astro API Routes diff --git a/with-astro/README.md b/with-astro/README.md index 9f7e7d5..6e807af 100644 --- a/with-astro/README.md +++ b/with-astro/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Astro diff --git a/with-dart/README.md b/with-dart/README.md index e0c444a..6fdb3a1 100644 --- a/with-dart/README.md +++ b/with-dart/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Dart diff --git a/with-django/README.md b/with-django/README.md index 1ab2ecb..d01e475 100644 --- a/with-django/README.md +++ b/with-django/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Django diff --git a/with-express/README.md b/with-express/README.md index f943926..8ea263b 100644 --- a/with-express/README.md +++ b/with-express/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Express diff --git a/with-fastapi/README.md b/with-fastapi/README.md index 069c226..2599b64 100644 --- a/with-fastapi/README.md +++ b/with-fastapi/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and FastAPI diff --git a/with-flask/README.md b/with-flask/README.md index 5d3f530..8b64983 100644 --- a/with-flask/README.md +++ b/with-flask/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Flask diff --git a/with-golang-gorm/README.md b/with-golang-gorm/README.md index 58a1c4e..43fc5f4 100644 --- a/with-golang-gorm/README.md +++ b/with-golang-gorm/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Golang (Gorm ORM) diff --git a/with-golang/README.md b/with-golang/README.md index 13abf07..d7502e1 100644 --- a/with-golang/README.md +++ b/with-golang/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Golang diff --git a/with-hono/README.md b/with-hono/README.md index 6353d83..a10dee5 100644 --- a/with-hono/README.md +++ b/with-hono/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Hono diff --git a/with-nestjs/README.md b/with-nestjs/README.md index 56149aa..a6afda7 100644 --- a/with-nestjs/README.md +++ b/with-nestjs/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and NestJS diff --git a/with-nextjs-aws-s3/README.md b/with-nextjs-aws-s3/README.md index d03e550..5d0f138 100644 --- a/with-nextjs-aws-s3/README.md +++ b/with-nextjs-aws-s3/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon, Next.js and AWS S3 diff --git a/with-nextjs-drizzle-edge/README.md b/with-nextjs-drizzle-edge/README.md new file mode 100644 index 0000000..3129d2e --- /dev/null +++ b/with-nextjs-drizzle-edge/README.md @@ -0,0 +1,43 @@ + + +# Getting started with Neon, Next.js, Drizzle and Vercel Edge + +## Clone the repository + +```bash +npx degit neondatabase/examples/with-nextjs-drizzle-edge ./with-nextjs-drizzle-edge +``` + +Run the command below to copy the `.env.example` file: + +``` +cp .env.example .env +``` + +## Store your Neon credentials + +Store your Neon credentials in your `.env` file. + +``` +POSTGRES_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" +``` + +- `user` is the database user. +- `password` is the database user’s password. +- `endpoint_hostname` is the host with neon.tech as the [TLD](https://www.cloudflare.com/en-gb/learning/dns/top-level-domain/). +- `dbname` is the name of the database. “neondb” is the default database created with each Neon project. +- `?sslmode=require` an optional query parameter that enforces the [SSL](https://www.cloudflare.com/en-gb/learning/ssl/what-is-ssl/) mode while connecting to the Postgres instance for better security. + +**Important**: To ensure the security of your data, never expose your Neon credentials to the browser. + +Run the command below to install project dependencies: + +``` +npm install +``` + +Run the Next.js application using the following command: + +``` +npm run dev +``` diff --git a/with-nextjs-edge-functions/README.md b/with-nextjs-edge-functions/README.md index f3ab7c2..667ce7b 100644 --- a/with-nextjs-edge-functions/README.md +++ b/with-nextjs-edge-functions/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Next.js Edge Functions diff --git a/with-nextjs-get-server-side-props/README.md b/with-nextjs-get-server-side-props/README.md index 5333b8f..828152d 100644 --- a/with-nextjs-get-server-side-props/README.md +++ b/with-nextjs-get-server-side-props/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Next.js getServerSideProps diff --git a/with-nextjs-get-static-props/README.md b/with-nextjs-get-static-props/README.md index 9acc69d..b9bad78 100644 --- a/with-nextjs-get-static-props/README.md +++ b/with-nextjs-get-static-props/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Next.js getStaticProps diff --git a/with-nextjs-prisma-edge/README.md b/with-nextjs-prisma-edge/README.md new file mode 100644 index 0000000..7a70244 --- /dev/null +++ b/with-nextjs-prisma-edge/README.md @@ -0,0 +1,50 @@ + + +# Getting started with Neon, Next.js, Prisma and Vercel Edge + +## Clone the repository + +```bash +npx degit neondatabase/examples/with-nextjs-prisma-edge ./with-nextjs-prisma-edge +``` + +Run the command below to copy the `.env.example` file: + +``` +cp .env.example .env +``` + +## Store your Neon credentials + +Store your Neon credentials in your `.env` file. + +``` +POSTGRES_PRISMA_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" +POSTGRES_URL_NON_POOLING="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" +``` + +- `user` is the database user. +- `password` is the database user’s password. +- `endpoint_hostname` is the host with neon.tech as the [TLD](https://www.cloudflare.com/en-gb/learning/dns/top-level-domain/). +- `dbname` is the name of the database. “neondb” is the default database created with each Neon project. +- `?sslmode=require` an optional query parameter that enforces the [SSL](https://www.cloudflare.com/en-gb/learning/ssl/what-is-ssl/) mode while connecting to the Postgres instance for better security. + +**Important**: To ensure the security of your data, never expose your Neon credentials to the browser. + +Run the command below to install project dependencies: + +``` +npm install +``` + +Next, run the command below to seed the database: + +``` +npm run prisma:initiate +``` + +Finally, run the Next.js application using the following command: + +``` +npm run dev +``` diff --git a/with-nextjs-prisma/README.md b/with-nextjs-prisma/README.md index d489072..80c739a 100644 --- a/with-nextjs-prisma/README.md +++ b/with-nextjs-prisma/README.md @@ -1,40 +1,49 @@ -# Neon with Next.js and Prisma + -This app is built using the following technologies: -- Neon as the Postgres database -- Next.js as the fullstack framework -- Prisma as the ORM +# Getting started with Neon, Next.js and Prisma -First, clone the project locally and install the project dependencies by running the following commands: +## Clone the repository ```bash -git clone -cd with-nextjs-prisma -npm install +npx degit neondatabase/examples/with-nextjs-prisma ./with-nextjs-prisma ``` +Run the command below to copy the `.env.example` file: -Next, update the .env file with your database credentials. +``` +cp .env.example .env +``` +## Store your Neon credentials -```bash -npm run setup -``` +Store your Neon credentials in your `.env` file. -Next, run the following command to setup your project: - -```bash -npm run setup +``` +DATABASE_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" ``` -This commands creates an initial migration and seeds the database with some initial data. +- `user` is the database user. +- `password` is the database user’s password. +- `endpoint_hostname` is the host with neon.tech as the [TLD](https://www.cloudflare.com/en-gb/learning/dns/top-level-domain/). +- `dbname` is the name of the database. “neondb” is the default database created with each Neon project. +- `?sslmode=require` an optional query parameter that enforces the [SSL](https://www.cloudflare.com/en-gb/learning/ssl/what-is-ssl/) mode while connecting to the Postgres instance for better security. -Finally, run the following command to start the development server: +**Important**: To ensure the security of your data, never expose your Neon credentials to the browser. -```bash -npm run dev +Run the command below to install project dependencies: + +``` +npm install ``` -When you navigate to [http://localhost:3000](http://localhost:3000) you should see the following: +Next, run the command below to seed the database: -Arc-001513 +``` +npm run setup +``` + +Finally, run the Next.js application using the following command: + +``` +npm run dev +``` diff --git a/with-nextjs-prisma/package.json b/with-nextjs-prisma/package.json index 03316b5..c1862c8 100644 --- a/with-nextjs-prisma/package.json +++ b/with-nextjs-prisma/package.json @@ -4,9 +4,11 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "next lint", "setup": "npx prisma migrate dev -n initial-setup && npx prisma db seed" }, + "prisma": { + "seed": "ts-node --transpile-only --compiler-options {\"module\":\"CommonJS\"} prisma/seed.ts" + }, "dependencies": { "@prisma/client": "4.10.1", "next": "13.2.1", @@ -25,8 +27,5 @@ "tailwindcss": "^3.2.7", "ts-node": "10.9.1", "typescript": "4.9.5" - }, - "prisma": { - "seed": "ts-node --transpile-only --compiler-options {\"module\":\"CommonJS\"} prisma/seed.ts" } } diff --git a/with-nextjs-server-actions/README.md b/with-nextjs-server-actions/README.md index eed8b9b..2cd42bc 100644 --- a/with-nextjs-server-actions/README.md +++ b/with-nextjs-server-actions/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Next.js Server Actions diff --git a/with-nextjs-server-components/README.md b/with-nextjs-server-components/README.md index a65d110..00aba2f 100644 --- a/with-nextjs-server-components/README.md +++ b/with-nextjs-server-components/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Next.js Server Components diff --git a/with-nextjs-serverless-functions/README.md b/with-nextjs-serverless-functions/README.md index 74d69cd..aee5d48 100644 --- a/with-nextjs-serverless-functions/README.md +++ b/with-nextjs-serverless-functions/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Next.js Serverless Functions diff --git a/with-nodejs-pg-notify/README.md b/with-nodejs-pg-notify/README.md index 0a6d02c..78cac5e 100644 --- a/with-nodejs-pg-notify/README.md +++ b/with-nodejs-pg-notify/README.md @@ -1,4 +1,4 @@ - + # Using pg_notify with Neon and NodeJS diff --git a/with-nodejs/README.md b/with-nodejs/README.md index d03fd37..006a7ce 100644 --- a/with-nodejs/README.md +++ b/with-nodejs/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and NodeJS diff --git a/with-python-asyncpg/README.md b/with-python-asyncpg/README.md index 9bf3971..06b9a62 100644 --- a/with-python-asyncpg/README.md +++ b/with-python-asyncpg/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Python using asyncpg diff --git a/with-python-psycopg2/README.md b/with-python-psycopg2/README.md index b464cd1..b85a436 100644 --- a/with-python-psycopg2/README.md +++ b/with-python-psycopg2/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Python using psycopg2 diff --git a/with-remix/README.md b/with-remix/README.md index 3702f4a..7041670 100644 --- a/with-remix/README.md +++ b/with-remix/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Remix diff --git a/with-ruby/README.md b/with-ruby/README.md index c5d47cf..286c60b 100644 --- a/with-ruby/README.md +++ b/with-ruby/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Ruby diff --git a/with-rust/README.md b/with-rust/README.md index c395872..8147e00 100644 --- a/with-rust/README.md +++ b/with-rust/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Rust diff --git a/with-solid-start/README.md b/with-solid-start/README.md index 9664e28..71feea7 100644 --- a/with-solid-start/README.md +++ b/with-solid-start/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Solid Start diff --git a/with-sqlalchemy-asyncpg/README.md b/with-sqlalchemy-asyncpg/README.md index 3a5d076..1859b33 100644 --- a/with-sqlalchemy-asyncpg/README.md +++ b/with-sqlalchemy-asyncpg/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and SQLAlchemy using asyncpg diff --git a/with-sveltekit-feature-flags/README.md b/with-sveltekit-feature-flags/README.md index 45ffc46..080ff12 100644 --- a/with-sveltekit-feature-flags/README.md +++ b/with-sveltekit-feature-flags/README.md @@ -1,4 +1,4 @@ - + # Feature Flags with Neon and SvelteKit diff --git a/with-sveltekit/README.md b/with-sveltekit/README.md index e3afebd..ef78124 100644 --- a/with-sveltekit/README.md +++ b/with-sveltekit/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and SvelteKit diff --git a/with-waku/README.md b/with-waku/README.md index 61a102f..20d659b 100644 --- a/with-waku/README.md +++ b/with-waku/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Waku diff --git a/with-wasp/README.md b/with-wasp/README.md index c812e77..9611710 100644 --- a/with-wasp/README.md +++ b/with-wasp/README.md @@ -1,4 +1,4 @@ - + # Getting started with Neon and Wasp