Skip to content

A Next.JS app using the SWR API, and a resource server written to fail in various ways in Node.js

Notifications You must be signed in to change notification settings

krimple/swr-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample SWR playground

This is a Next.JS React application, written using SWR, that queries a JSON resource server written in node.js. It fails in two ways:

  • when a json payload is incorrectly formed
  • when a server-side error (500) condition exists

These happen randomly, along with a successful response with a valid payload.

The URL for the server demo is http://localhost:3000/demo

To set up and run the Next.js app:

cd client
npm init
npm run dev

To set up and run the resource server

cd server
npm init
npm start

About

A Next.JS app using the SWR API, and a resource server written to fail in various ways in Node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published