A web server that provides a basic HTTP API for querying the dependency tree of an npm package.
- Golang >= 1.24
- GNU Make
- (Optionally) Docker
For convenience, a Makefile is provided to perform different tasks. For more details, run:
make helpmake runmake docker-runThe server will now be running on an available port (defaulting to 8080).
The server contains two endpoints
/healthcheck/package/{packageName}/{packageVersion}
Here is an example that uses curl and jq to fetch the dependencies for react@16.13.0
curl -s http://localhost:8080/package/react/16.13.0 | jq .The code is formatted using golangci-lint, you can run this via:
make fmtThe code is linted using golangci-lint, you can run this via:
make lintYou can run the unit-tests with this command:
make testAdditionally, you can run the integration-tests with this command:
make test-int