syrusakbary / nextjs-react-server-components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Next.js App Router + React Server Components

Try the demo live here: next-rsc-hn.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

  1. npm install
  2. npm dev

You can run the React Server Components project using Wasmer (check out the install guide):

npm run edge:build
npm run edge:preview

Open http://localhost:3000 with your browser to see the result.

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://next-rsc-hn.wasmer.app/

First, you'll need to run npm run edge:build, and then, to deploy to Wasmer Edge:

wasmer deploy

About

License:MIT License


Languages

Language:JavaScript 40.2%Language:CSS 33.8%Language:TypeScript 25.9%