57dcc9d329
This command changed in pnpm [6.32.13](https://github.com/pnpm/pnpm/releases/tag/v6.32.13) and [7.1.1](https://github.com/pnpm/pnpm/releases/tag/v7.1.1) so lets update it since its been a few weeks and we can expect pnpm users to update more regularly than npm users. - Fixes https://github.com/vercel/next.js/pull/37240 - Fixes https://github.com/vercel/next.js/pull/37045 - Fixes https://github.com/vercel/next.js/pull/37032 - Fixes https://github.com/vercel/next.js/pull/36602 - Fixes https://github.com/vercel/next.js/pull/36496 |
||
---|---|---|
.. | ||
pages | ||
.gitignore | ||
next.config.js | ||
package.json | ||
README.md | ||
server.js |
HTTP2 server example
This example shows the most basic example using an HTTP2 server. We have 2 pages: pages/index.js
and pages/about.js
. The former responds to /
requests and the latter to /about
. Using next/link
you can add hyperlinks between them with universal routing capabilities.
How to use
Execute create-next-app
with npm, Yarn, or pnpm to bootstrap the example:
npx create-next-app --example with-http2 with-http2-app
# or
yarn create next-app --example with-http2 with-http2-app
# or
pnpm create next-app --example with-http2 with-http2-app
Create the public and private keys:
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 (Documentation).