Skip to content

A quick and easy tunnel to listen to the outside world from within Emacs

Notifications You must be signed in to change notification settings

leppert/receiver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

receiver.el

Receiver is an Emacs script for quickly opening up a beame-insta-ssl tunnel to a local elnode server that outputs any request params to a pretty-printed buffer.

It’s handy for testing webhooks and currently assumes POST requests sending JSON data, but could easily be expanded with additional format support (PRs welcomed).

For an example use-case, check out this Stack Overflow question.

Installation

  • Install elnode
  • Install this script

Configuration

Install your preferred tunnel and set receiver-tunnel-command to properly execute it, where %p will be replaced with the port defined in receiver-port. For example, the default command is:

"beame-insta-ssl tunnel %p http"

To use beame-insta-ssl, follow their installation instructions here. If instead you’d like to use localtunnel.me, your receiver-tunnel-command might look something like this:

"lt --port %p"

Ngrok may also work.

Usage

  • receiver-listen opens the tunnel and starts the web server
  • Results are printed to a buffer named *HTTP Request*
  • Tunnel status is printed to a buffer named receiver
  • receiver-hangup closes the tunnel and web server

Notifications

Receiver provides a receiver-request-received-hook hook, allowing you to receive notifications when requests arrive. An example using alert.el might look something like this:

(add-hook 'receiver-request-received-hook
          (lambda () (alert "A new request has arrived!")))

About

A quick and easy tunnel to listen to the outside world from within Emacs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published