Sign inSign up

stefancosquer/api-sniffer

By stefancosquer

•Updated over 5 years ago

A simple tool to trace API calls

Image
1

557

stefancosquer/api-sniffer repository overview

API Sniffer Logo

⁠API Sniffer Badge Quality Gate Status

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.

⁠Running

⁠Locally

Use the package manager npm⁠ to install dependencies.

$ npm i
$ npm run build
$ npm run start
⁠With Docker
$ docker build -t api-sniffer .
$ docker run -p 8080:8080 -ti --rm api-sniffer

Or with Docker Compose

$ docker-compose up
⁠App Engine
$ gcloud init
$ gcloud app deploy

⁠Usage

⁠Tracing API calls

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
⁠Viewing API calls

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.

Screenshot

⁠Development

To run the development server with live reloading

$ npm run dev

⁠Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

⁠License

MIT⁠

Tag summary

Content type

Image

Digest

Size

85.8 MB

Last updated

over 5 years ago

docker pull stefancosquer/api-sniffer