Skip to content

hajnyon/msw-demo-app

Repository files navigation

MSW demo

This is a simple app to demonstrate MSW library.

It was created as part of my presentation on Frontkon 2024 conference:

Usage

Set .env.local file (see .env.example for reference) and then.

npm install
npm run dev

Demo app

The app has a single view with 2 pringles cans, that loads the initial data using HTTP GET request and while user votes using buttons, it propagates those changes using WebSockets. You can tweak the MSW handlers in ./src/mocks/browser.js to play with the data.