Tests msw with fetch, axios and other libs.
npm i
npm start
npm test
The article below in step 1 shows how to generate your SSL certificate but I do not recommend creating the certificate for localhost.
Instead first add an alias to your hosts file like localdev or some other name
of your choice.
sudo nano /etc/hosts
127.0.0.1 localdev
This ensures that you can still use http on localhost with all your other projects.
- Generate the SSL certificate for the alias name that you created with the instructions in this article by replacing
localhostwith the name of your alias: How to get HTTPS working on your local development environment in 5 minutes - Generate dev.key and dev.crt follow instructions in the article but replace
localhostwith the name of you alias name. - Place the generated
server.crtandserver.keyon the project root and rename them todev.crtanddev.key. - Run:
npm run start-https - Open the browser to https://localdev:3000/ or other alias name you created.