Skip to content

andreawyss/msw-tester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

msw-tester

Tests msw with fetch, axios and other libs.

Run with http

npm i
npm start
npm test

Run with https

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.

  1. sudo nano /etc/hosts
   127.0.0.1    localdev

This ensures that you can still use http on localhost with all your other projects.

  1. Generate the SSL certificate for the alias name that you created with the instructions in this article by replacing localhost with the name of your alias: How to get HTTPS working on your local development environment in 5 minutes
  2. Generate dev.key and dev.crt follow instructions in the article but replace localhost with the name of you alias name.
  3. Place the generated server.crt and server.key on the project root and rename them to dev.crt and dev.key.
  4. Run: npm run start-https
  5. Open the browser to https://localdev:3000/ or other alias name you created.

About

Tests msw with fetch, axios and other libs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published