API Sniffer is a simple tool to trace API calls between 2 backends.
All you need is to deploy API Sniffer and route all API calls you want to trace through it.
Use the package manager npm to install dependencies.
$ npm i
$ npm run build
$ npm run start
$ docker build -t api-sniffer .
$ docker run -p 8080:8080 -ti --rm api-sniffer
Or with Docker Compose
$ docker-compose up
$ gcloud init
$ gcloud app deploy
In order to trace API calls, you need to route them trought the embedded proxy.
To proxify a call, change the API URL as follows:
Original URL
https://example.com/api/v1/endpoint
Proxified URL
http://localhost:8080/proxy/example.com/api/v1/endpoint
Open http://localhost:8080 to view the app in the browser.
The exchanges list will be refreshed in realtime as API calls go through API Sniffer.
To run the development server with live reloading
$ npm run dev
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.