mitm-esm

Intercept and mock outgoing network TCP connections and HTTP requests for testing. Intercepts and gives you a Net.Socket, Http.IncomingMessage and Http.ServerResponse to test and respond with. Useful when testing code that hits remote servers.

Usage no npm install needed!

<script type="module">
  import mitmEsm from 'https://cdn.skypack.dev/mitm-esm';
</script>

README

mitm-esm

Test

mitm-esm is the native ES Module version of moll/node-mitm.

See #1 for more details on the rewrite.

License

mitm-esm is released under a Lesser GNU Affero General Public License, which in summary means:

  • You can use this program for no cost.
  • You can use this program for both personal and commercial reasons.
  • You do not have to share your own program's code which uses this program.
  • You have to share modifications (e.g. bug-fixes) you've made to this program.

For more convoluted language, see the LICENSE file.

About

Andri Möll created the original version at moll/node-mitm. Monday Calendar supported the engineering work.

Gregor Martynus made the code a native ES Module.