Next.js App Router + React Server Components
Try the demo live here: ggallon-wasmer-nextjs-rsc.wasmer.app.
Note: This app is a clone of Next.js Server Components demo, minimally adapted to run in WinterJS.
Introduction
This is a demo app of the Hacker News website clone, which shows Next.js App Router with support for React Server Components.
Running Locally
pnpm install
pnpm dev
Go to localhost:3000
.
If you want to run it with Wasmer locally, you can do pnpm run edge:build
and then pnpm run edge:preview
.
Deploy on Wasmer Edge
The easiest way to deploy this Next.js Server Side components app is to use the Wasmer Edge.
Live example: https://ggallon-wasmer-nextjs-rsc.wasmer.app/
First, you'll need to run npm run edge:build
, and then, to deploy to Wasmer Edge:
wasmer deploy
[!NOTE] You will need to have Wasmer installed (check out the docs to install the Wasmer CLI!). You will also need to change the namespace in
wasmer.toml
to your own namespace and app name inapp.yaml
to your own app name.