listen-for
Spin up a transient HTTP server and, once received, print the given [query] from the URL to stdout This is particularly useful in an OAuth pipeline.
Last updated 10 months ago by talon .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install listen-for 
SYNC missed versions from official npm registry.

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! That was remarkably satisfying"

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`

Current Tags

  • 1.0.1                                ...           latest (10 months ago)

2 Versions

  • 1.0.1                                ...           10 months ago
  • 1.0.0                                ...           10 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |