This project is a web app client for https://rickandmortyapi.com/. Built with Nextjs, Apollo Client, Zustand and Tailwind CSS.
https://rick-and-morty-blue.vercel.app/
- clone
yarn install
(ornpm i
)yarn dev
(ornpm start
)
https://mswjs.io/ is used to mock the api calls locally. However, at the time of creating this app, the latest version of MSW required node v16 which was not supported by Vercel (yet), due to lack of support for v16 in AWS Lambda functions. More: vercel/community#37 When I included it as dev dependency in package.json, then the (demo) build failed on Vercel. As a temporary walkaround, I removed MSW from dev dependencies in package.json.
In order to run tests, please make sure you added MSW by yarn add msw --dev
(or npm i --dev msw
) first, and then say yarn test
(or npm test
).