Unverified Commit 4162e396 authored by Luis Alvarez D's avatar Luis Alvarez D Committed by GitHub

Undo unrequired readme changes done to examples (#16831)

Related to https://github.com/vercel/next.js/pull/16678#issuecomment-684962496
parent 08859275
...@@ -12,4 +12,9 @@ npx create-next-app --example with-algolia-react-instantsearch with-algolia-reac ...@@ -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 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)). 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)).
...@@ -23,7 +23,23 @@ npx create-next-app --example with-firebase-hosting with-firebase-hosting-app ...@@ -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 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 ## Typescript
......
...@@ -12,4 +12,11 @@ npx create-next-app --example with-http2 with-http2-app ...@@ -12,4 +12,11 @@ npx create-next-app --example with-http2 with-http2-app
yarn 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)). 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)).
...@@ -20,4 +20,30 @@ npx create-next-app --example with-reason-relay with-reason-relay ...@@ -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 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)). 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)).
NEXT_PUBLIC_STOMP_SERVER=wss://some.stomp.server
\ No newline at end of file
...@@ -15,3 +15,7 @@ npx create-next-app --example with-stomp with-stomp-app ...@@ -15,3 +15,7 @@ npx create-next-app --example with-stomp with-stomp-app
# or # or
yarn create next-app --example with-stomp with-stomp-app 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)).
module.exports = {
// Build-time configuration
env: {
STOMP_SERVER: process.env.STOMP_SERVER,
},
}
...@@ -8,7 +8,7 @@ const useClient = () => { ...@@ -8,7 +8,7 @@ const useClient = () => {
React.useEffect(() => { React.useEffect(() => {
if (!stompClient) { if (!stompClient) {
stompClient = Stomp.client(process.env.STOMP_SERVER) stompClient = Stomp.client(process.env.NEXT_PUBLIC_STOMP_SERVER)
} }
if (!client) { if (!client) {
setClient(stompClient) setClient(stompClient)
......
...@@ -12,4 +12,14 @@ npx create-next-app --example with-webassembly with-webassembly-app ...@@ -12,4 +12,14 @@ npx create-next-app --example with-webassembly with-webassembly-app
yarn 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)). 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)).
...@@ -23,6 +23,14 @@ npx create-next-app --example with-zones with-zones-app ...@@ -23,6 +23,14 @@ npx create-next-app --example with-zones with-zones-app
yarn 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: 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 ```bash
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment