Skip to content

Commit

Permalink
Undo unrequired readme changes done to examples (#16831)
Browse files Browse the repository at this point in the history
Related to #16678 (comment)
  • Loading branch information
lfades authored Sep 3, 2020
1 parent 0885927 commit 4162e39
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 8 deletions.
5 changes: 5 additions & 0 deletions examples/with-algolia-react-instantsearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@ npx create-next-app --example with-algolia-react-instantsearch with-algolia-reac
yarn create next-app --example with-algolia-react-instantsearch with-algolia-react-instantsearch-app
```

To set up Algolia:

- create an [algolia](https://www.algolia.com/) account or use this already [configured index](https://community.algolia.com/react-instantsearch/Getting_started.html#before-we-start)
- update the `appId`, `apikey` and `indexName` you want to search on in [`components/instantsearch.js`](components/instantsearch.js)

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)).
18 changes: 17 additions & 1 deletion examples/with-firebase-hosting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,23 @@ npx create-next-app --example with-firebase-hosting with-firebase-hosting-app
yarn create next-app --example with-firebase-hosting with-firebase-hosting-app
```

Update `.firebaserc`: adding your firebase project ID
**Important:** Update `.firebaserc` and add your firebase project ID.

To run Firebase locally for testing:

```bash
npm run serve
# or
yarn serve
```

To deploy it to the cloud with Firebase:

```bash
npm run deploy
# or
yarn deploy
```

## Typescript

Expand Down
7 changes: 7 additions & 0 deletions examples/with-http2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,11 @@ npx create-next-app --example with-http2 with-http2-app
yarn create next-app --example with-http2 with-http2-app
```

Create the public and private keys:

```bash
openssl req -x509 -newkey rsa:2048 -nodes -sha256 -subj '/CN=localhost' \
-keyout localhost-privkey.pem -out localhost-cert.pem
```

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)).
26 changes: 26 additions & 0 deletions examples/with-reason-relay/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,30 @@ npx create-next-app --example with-reason-relay with-reason-relay
yarn create next-app --example with-reason-relay with-reason-relay
```

Download schema introspection data from configured Relay endpoint:

```bash
npm run schema
# or
yarn schema
```

Run Relay ahead-of-time compilation (should be re-run after any edits to components that query data with Relay)

```bash
npm run relay
# or
yarn relay
```

Build and run the Relay project

```bash
npm run build
npm run dev
# or
yarn build
yarn dev
```

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)).
1 change: 1 addition & 0 deletions examples/with-stomp/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NEXT_PUBLIC_STOMP_SERVER=wss://some.stomp.server
4 changes: 4 additions & 0 deletions examples/with-stomp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ npx create-next-app --example with-stomp with-stomp-app
# or
yarn create next-app --example with-stomp with-stomp-app
```

You'll need to provide the STOMP url of your server before running the app. Open [`.env`](.env) and update the `NEXT_PUBLIC_STOMP_SERVER` environment variable.

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)).
6 changes: 0 additions & 6 deletions examples/with-stomp/next.config.js

This file was deleted.

2 changes: 1 addition & 1 deletion examples/with-stomp/useClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const useClient = () => {

React.useEffect(() => {
if (!stompClient) {
stompClient = Stomp.client(process.env.STOMP_SERVER)
stompClient = Stomp.client(process.env.NEXT_PUBLIC_STOMP_SERVER)
}
if (!client) {
setClient(stompClient)
Expand Down
10 changes: 10 additions & 0 deletions examples/with-webassembly/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,14 @@ npx create-next-app --example with-webassembly with-webassembly-app
yarn create next-app --example with-webassembly with-webassembly-app
```

This example uses Rust compiled to wasm, the wasm file is included in the example, but to compile your own Rust code you'll have to [install](https://www.rust-lang.org/learn/get-started) Rust.

To compile `src/add.rs` to `add.wasm` run:

```bash
npm run build-rust
# or
yarn build-rust
```

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)).
8 changes: 8 additions & 0 deletions examples/with-zones/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ npx create-next-app --example with-zones with-zones-app
yarn create next-app --example with-zones with-zones-app
```

Install the dependencies of every app (`/home` and `/blog`):

```bash
npm install
# or
yarn
```

Install the [Vercel CLI](https://vercel.com/download) if you don't have it already, and then run [`vercel dev`](https://vercel.com/docs/cli?query=dev#commands/dev) in the main directory to start the development server:

```bash
Expand Down

0 comments on commit 4162e39

Please sign in to comment.