Mock serverside API requests using NextJS and MSWjs

  Рет қаралды 186

Eddie Jaoude

Eddie Jaoude

Күн бұрын

There are multiple reasons why we would want to mock out a service side API request: local development, offline development, avoid hitting rate limits on third party services and manipulating data for testing. This can be difficult but with the MSWjs library this is straightforward and can easily be integrated with NextJS using the latest instrumentation experimental feature.
If you prefer you can read my blog on this subject here: open.substack....
---
MY BLOG AND NEWSLETTER
For my articles on Open Source as a Contributor and Maintainer, Web Development with Javascript and Typescript, my experience as a freelancer and remote work as a Digital Nomad, Content Creation, Personal Branding and monetising these, check out my Substack: eddiejaoude.su...
SERVICES I USE AND RECOMMEND
Some of these might be affiliate links but they're no extra cost you and you might get a discount if you sign up.
- Live streaming with Streamyard streamyard.com...
- Cloud hosting with Digital Ocean, you will get $100 FREE credit m.do.co/c/c258...
- Podia host your digital products (PDFs, Videos etc) www.podia.com/...
- Riverside for recording high quality podcasts riverside.fm/?...
---
Mock serverside API requests using NextJS and MSWjs

Пікірлер: 5
@eddiejaoude
@eddiejaoude 12 күн бұрын
See MSWjs and NextJS with Instrumentation feature in a real open source project github.com/EddieHubCommunity/HealthCheck
@jayraldempino1944
@jayraldempino1944 9 күн бұрын
I use mswjs in client side which sooo good. In terms of the mock data, fakerjs is also better with it. Thanks for this, man! Thumbs up for this tutorial.
@eddiejaoude
@eddiejaoude 9 күн бұрын
Thank you for the great feedback!!
@JibbaJabber
@JibbaJabber 11 күн бұрын
#Noice
@eddiejaoude
@eddiejaoude 11 күн бұрын
thank you
Why do Developers HATE writing tests? And are they right?
21:31
Turns out REST APIs weren't the answer (and that's OK!)
10:38
Dylan Beattie
Рет қаралды 157 М.
大家都拉出了什么#小丑 #shorts
00:35
好人小丑
Рет қаралды 90 МЛН
Nastya and balloon challenge
00:23
Nastya
Рет қаралды 50 МЛН
Apple peeling hack @scottsreality
00:37
_vector_
Рет қаралды 125 МЛН
Node.js is a serious thing now… (2023)
8:18
Code With Ryan
Рет қаралды 646 М.
Postgres just got even faster
26:42
Hussein Nasser
Рет қаралды 20 М.
Dockerize Next.js 14+ App in 2024
4:20
Frontend Basics
Рет қаралды 2,7 М.
GitHub Copilot AI features in Visual Studio BEYOND "just writing code"
19:26
Are you using Global Git Ignore?
7:45
Eddie Jaoude
Рет қаралды 283
The intro to Docker I wish I had when I started
18:27
typecraft
Рет қаралды 87 М.
HOC Pattern in React
20:51
Cosden Solutions
Рет қаралды 9 М.
You Should Use Hono in your Next Project
13:47
Syntax
Рет қаралды 14 М.
Implement Clean Architecture in Next.js
53:07
Lazar Nikolov
Рет қаралды 19 М.
大家都拉出了什么#小丑 #shorts
00:35
好人小丑
Рет қаралды 90 МЛН