A basic util that enables you to quickly debug the requests coming to endpoint, before writing the backend itself or deploying on localhost.
--file (-f) => File that contains data that will be returned to the client.
--data (-d) => Raw data that will be returned
--output (-o) => Filename that will contain all requests data in JSON format
You can't use -f and -d simultaneously.
qapi { flags } portIf you don't provide a port it will default to 5000
Run on port 80
qapi 80Run on 80 and return text:
qapi -d Hello_there! 80Return text on request:
qapi -f example.txt 80If vou want to return raw JSON:
{"Testing":"test"}
Make sure to escape quotes like this:
qapi -d {\"Testing\":\"test\"} 80go install github.com/nullby1e/qAPI@latest