README
Overview
listen-for <query>
Spin up a transient HTTP server and, once received, print the given [query] from
the URL to stdout
Options:
--version Show version number [boolean]
-p, --port The port to listen on [number] [default: 5000]
-v, --verbose show some logs that may be helpful [boolean] [default: false]
--help Show help [boolean]
Install
npm i -g listen-for
Example
run this:
listen-for message
visit: http://localhost:5000?message=Wow!%20That%20was%20remarkably%20satisfying"
finally, check your console ✨
Why
I wanted something I could slip into a shell based oauth pipeline!
# open the /authorize URL in a browser with the right params
code="$(listen-for code)"
# curl the acccess_token endpoint with `code`