Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theduke/nextjs-my-test-123
https://github.com/theduke/nextjs-my-test-123
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/theduke/nextjs-my-test-123
- Owner: theduke
- License: mit
- Created: 2024-03-11T19:40:09.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-11T19:40:12.000Z (10 months ago)
- Last Synced: 2024-10-14T17:21:37.866Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license.md
Awesome Lists containing this project
README
# Next.js App Router + React Server Components
Try the demo live here: [**theduke-nextjs-my-test-123.wasmer.app**](https://theduke-nextjs-my-test-123.wasmer.app).
> Note: This app is a clone of [Next.js Server Components demo](https://github.com/vercel/next-react-server-components/), [minimally adapted](https://github.com/theduke/nextjs-my-test-123/commit/0b2afd3a6e633caf7e43a89f4a89cd349365b482) to run in [WinterJS](https://github.com/wasmerio/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.
[Learn more](https://nextjs.org/docs/getting-started/react-essentials#server-components).
### Running Locally
1. `pnpm install`
2. `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](https://wasmer.io/products/edge).
Live example: https://theduke-nextjs-my-test-123.wasmer.app/
First, you'll need to run `npm run edge:build`, and then, to deploy to Wasmer Edge:
```bash
wasmer deploy
```> [!NOTE]
> You will need to have Wasmer installed (check out [the docs to install the Wasmer CLI](https://docs.wasmer.io/install)!).
> You will also need to change the namespace in `wasmer.toml` to your own namespace and app name in `app.yaml` to your own app name.