Skip to content

Commit

Permalink
examples: polish some README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
JamBalaya56562 committed Nov 8, 2024
1 parent 4fba975 commit 28a0e59
Show file tree
Hide file tree
Showing 45 changed files with 203 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_mediu

## How to use

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) or [npx](https://github.com/zkat/npx#readme) to bootstrap the example:
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:

```bash
npx create-next-app --example api-routes-apollo-server-and-client-auth api-routes-apollo-server-and-client-auth-app
Expand Down
1 change: 0 additions & 1 deletion examples/cache-handler-redis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Check out this [repository](https://github.com/ezeparziale/nextjs-k8s) that cont
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:

```bash

npx create-next-app --example cache-handler-redis cache-handler-redis-app
```

Expand Down
2 changes: 1 addition & 1 deletion examples/cms-prepr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Check out our Blog page example:

## How to use

Run one of the following [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) commands using [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to create a new Next.js app and connect it to Prepr:
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:

```bash
npx create-next-app --example cms-prepr cms-prepr-app
Expand Down
4 changes: 2 additions & 2 deletions examples/cms-sitecore-xmcloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ npx create-next-app --example cms-sitecore-xmcloud cms-sitecore-xmcloud-app
```

```bash
yarn create-next-app --example cms-sitecore-xmcloud cms-sitecore-xmcloud-app
yarn create next-app --example cms-sitecore-xmcloud cms-sitecore-xmcloud-app
```

```bash
pnpm create-next-app --example cms-sitecore-xmcloud cms-sitecore-xmcloud-app
pnpm create next-app --example cms-sitecore-xmcloud cms-sitecore-xmcloud-app
```

## Configuration
Expand Down
File renamed without changes.
14 changes: 9 additions & 5 deletions examples/github-pages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ The `out` directory should not be ignored by version control.
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:

```bash
npx create-next-app --example github-pages nextjs-github-pages
# or
yarn create next-app --example github-pages nextjs-github-pages
# or
pnpm create next-app --example github-pages nextjs-github-pages
npx create-next-app --example github-pages github-pages-app
```

```bash
yarn create next-app --example github-pages github-pages-app
```

```bash
pnpm create next-app --example github-pages github-pages-app
```

### Deploy to GitHub Pages
Expand Down
6 changes: 3 additions & 3 deletions examples/server-actions-upload/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ This example shows how you can build upload forms with Next.js and Server Action
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:

```bash
npx create-next-app --example server-actions-upload next-upload-app
npx create-next-app --example server-actions-upload server-actions-upload-app
```

```bash
yarn create next-app --example server-actions-upload next-upload-app
yarn create next-app --example server-actions-upload server-actions-upload-app
```

```bash
pnpm create next-app --example server-actions-upload next-upload-app
pnpm create next-app --example server-actions-upload server-actions-upload-app
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
2 changes: 1 addition & 1 deletion examples/with-algolia-react-instantsearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pnpm create next-app --example with-algolia-react-instantsearch with-algolia-rea
```

```bash
bun create next-app --example with-algolia-react-instantsearch with-algolia-react-instantsearch-app
bunx create-next-app --example with-algolia-react-instantsearch with-algolia-react-instantsearch-app
```

This example is already configured with an e-commerce index, but you can easily customize it by:
Expand Down
6 changes: 3 additions & 3 deletions examples/with-apivideo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_mediu
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:

```bash
npx create-next-app --example with-apivideo
npx create-next-app --example with-apivideo with-apivideo-app
```

```bash
yarn create next-app --example with-apivideo
yarn create next-app --example with-apivideo with-apivideo-app
```

```bash
pnpm create next-app --example with-apivideo
pnpm create next-app --example with-apivideo with-apivideo-app
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
Expand Down
2 changes: 1 addition & 1 deletion examples/with-axiom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Check out our [Next.js deployment documentation](https://nextjs.org/docs/deploym

## How to use

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example::
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:

```bash
npx create-next-app --example with-axiom with-axiom-app
Expand Down
8 changes: 4 additions & 4 deletions examples/with-cloudinary/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ Check out our [Next.js deployment documentation](https://nextjs.org/docs/deploym

## How to use

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example::
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:

```bash
npx create-next-app --example with-cloudinary nextjs-image-gallery
npx create-next-app --example with-cloudinary with-cloudinary-app
```

```bash
yarn create next-app --example with-cloudinary nextjs-image-gallery
yarn create next-app --example with-cloudinary with-cloudinary-app
```

```bash
pnpm create next-app --example with-cloudinary nextjs-image-gallery
pnpm create next-app --example with-cloudinary with-cloudinary-app
```

## References
Expand Down
12 changes: 7 additions & 5 deletions examples/with-fauna/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_mediu

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:

```
```bash
npx create-next-app --example with-fauna with-fauna-app
# or
```

```bash
yarn create next-app --example with-fauna with-fauna-app
# or
pnpm create next-app --example with-fauna with-fauna-app
```

You can start with this template [using `create-next-app`](#using-create-next-app) or by [downloading the repository manually](#download-manually).
```bash
pnpm create next-app --example with-fauna with-fauna-app
```

### Setting Up Your Fauna Database

Expand Down
14 changes: 9 additions & 5 deletions examples/with-i18n-next-intl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@ Deploy the example using [Vercel](https://vercel.com) or preview live with [Stac
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:

```bash
npx create-next-app --example with-i18n-next-intl
# or
yarn create next-app --example with-i18n-next-intl
# or
pnpm create next-app --example with-i18n-next-intl
npx create-next-app --example with-i18n-next-intl with-i18n-next-intl-app
```

```bash
yarn create next-app --example with-i18n-next-intl with-i18n-next-intl-app
```

```bash
pnpm create next-app --example with-i18n-next-intl with-i18n-next-intl-app
```

Deploy it to the cloud with [Vercel](https://vercel.com/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
2 changes: 1 addition & 1 deletion examples/with-ionic-typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_mediu

## How to use

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) or [npx](https://github.com/zkat/npx#readme) to bootstrap the example:
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:

```bash
npx create-next-app --example with-ionic-typescript with-ionic-typescript-app
Expand Down
14 changes: 11 additions & 3 deletions examples/with-jest-babel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ This includes Next.js' built-in support for Global CSS, CSS Modules and TypeScri

## How to Use

Quickly get started using [Create Next App](https://github.com/vercel/next.js/tree/canary/packages/create-next-app#readme)!

In your terminal, run the following command:
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:

```bash
npx create-next-app --example with-jest-babel with-jest-babel-app
Expand All @@ -27,3 +25,13 @@ pnpm create next-app --example with-jest-babel with-jest-babel-app
```bash
npm test
```

```bash
yarn test
```

```bash
pnpm test
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
14 changes: 11 additions & 3 deletions examples/with-jest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ This includes Next.js' built-in support for Global CSS, CSS Modules and TypeScri

## How to Use

Quickly get started using [Create Next App](https://github.com/vercel/next.js/tree/canary/packages/create-next-app#readme)!

In your terminal, run the following command:
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:

```bash
npx create-next-app --example with-jest with-jest-app
Expand All @@ -33,3 +31,13 @@ pnpm create next-app --example with-jest with-jest-app
```bash
npm test
```

```bash
yarn test
```

```bash
pnpm test
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
6 changes: 6 additions & 0 deletions examples/with-knex/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ pnpm create next-app --example with-knex with-knex-app
npm install
# or
yarn
# or
pnpm install
```

### Set up a Postgres database
Expand All @@ -56,6 +58,8 @@ You can create, apply and rollback migrations using the scripts in `package.json
npm run migrate:latest
# or
yarn migrate:latest
# or
pnpm migrate:latest
```

### Start Next.js in development mode
Expand All @@ -64,6 +68,8 @@ yarn migrate:latest
npm run dev
# or
yarn dev
# or
pnpm dev
```

Your app should now be up and running on [http://localhost:3000](http://localhost:3000)! If it doesn't work, post on [GitHub discussions](https://github.com/vercel/next.js/discussions).
Expand Down
2 changes: 2 additions & 0 deletions examples/with-magic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ Now, run Next.js in development mode
npm run dev
# or
yarn dev
# or
pnpm dev
```

Your app should be up and running on [http://localhost:3000](http://localhost:3000)! If it doesn't work, post on [GitHub discussions](https://github.com/vercel/next.js/discussions).
Expand Down
2 changes: 2 additions & 0 deletions examples/with-mocha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ pnpm create next-app --example with-mocha with-mocha-app
npm run test
# or
yarn test
# or
pnpm test
```

> A very important part of this example is the `.babelrc` file which configures the `test` environment to use `babel-preset-env` and configures it to transpile modules to `commonjs`). [Learn more](https://github.com/vercel/next.js/issues/2895).
5 changes: 3 additions & 2 deletions examples/with-mongodb-mongoose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,12 @@ Then set each variable on `.env.local`:
```bash
npm install
npm run dev

# or

yarn install
yarn dev
# or
pnpm install
pnpm dev
```

Your app should be up and running on [http://localhost:3000](http://localhost:3000)! If it doesn't work, post on [GitHub discussions](https://github.com/vercel/next.js/discussions).
Expand Down
5 changes: 3 additions & 2 deletions examples/with-mongodb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,12 @@ Set each variable on `.env.local`:
```bash
npm install
npm run dev

# or

yarn install
yarn dev
# or
pnpm install
pnpm dev
```

Your app should be up and running on [http://localhost:3000](http://localhost:3000)! If it doesn't work, post on [GitHub discussions](https://github.com/vercel/next.js/discussions).
Expand Down
8 changes: 8 additions & 0 deletions examples/with-msw/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ The service worker file will automatically be generated in `public/mockServiceWo
npx msw init public/
```

```bash
yarn msw init public/
```

```bash
pnpm msw init public/
```

More information on this setup step can be found in the MSW documentation [here](https://mswjs.io/docs/getting-started/integrate/browser#setup).

## Deploy your own
Expand Down
2 changes: 1 addition & 1 deletion examples/with-mux-video/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Deploy the example using [Vercel](https://vercel.com/home):

### Step 1. Create a Next app with this example

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), [pnpm](https://pnpm.io), or [Bun](https://bun.sh/docs/cli/bunx) to bootstrap the example:

```bash
npx create-next-app --example with-mux-video with-mux-video-app
Expand Down
36 changes: 33 additions & 3 deletions examples/with-mysql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,47 @@ mysql://<USERNAME>:<PLAIN_TEXT_PASSWORD>@<ACCESS_HOST_URL>/<DATABASE_NAME>?sslac

Push the database schema to your PlanetScale database using Prisma.

`npx prisma db push`
```bash
npx prisma db push
```

```bash
yarn prisma db push
```

```bash
pnpm prisma
```

Run the seed script to populate your database with `Product` and `Category` data.

`npm run seed`
```bash
npm run seed
```

```bash
yarn seed
```

```bash
pnpm seed
```

## Run the App

Run the app with following command:

`npm run dev`
```bash
npm run dev
```

```bash
yarn dev
```

```bash
pnpm dev
```

Open your browser at [localhost:3000](localhost:3000) to see the running application.

Expand Down
Loading

0 comments on commit 28a0e59

Please sign in to comment.