Mock serverside API requests using NextJS and MSWjs
Eddie Jaoude
economicspop culturetechnologyangularbrandingbusinesscdcicirclecicodecodercypressdashboardhubdeveloperdeveloper advocatedevlifedevopsdevreldiagramsdigital nomaddocumentationfirebasefullstackgithubjavascriptmachine learningmeetupmentoringmermaidnodeopen sourceopensourcepddpipeline driven developmentreactreact vs angularstartupstartup lifestrengthstechtypescriptweaknessweb developerwebdev
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.
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: https://eddiejaoude.substack.com
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 https://streamyard.com/pal/c/6103980796280832
- Cloud hosting with Digital Ocean, you will get $100 FREE credit https://m.do.co/c/c25882c2a61d
- Podia host your digital products (PDFs, Videos etc) https://www.podia.com/?via=09d82a
- Riverside for recording high quality podcasts https://riverside.fm/?utm_campaign=campaign_1&utm_medium=affiliate&utm_source=rewardful&via=eddie-jaoude
Mock serverside API requests using NextJS and MSWjs ... https://www.youtube.com/watch?v=Z2lz6W12BCQ
2024-09-04
0.0 LBC
Copyrighted (contact publisher)
166886724 Bytes