Skip to content

Instantly share code, notes, and snippets.

@smetj
Last active February 25, 2018 12:05
Show Gist options
  • Save smetj/8cc3ef80628d591ba1d907ddd125f8c8 to your computer and use it in GitHub Desktop.
Save smetj/8cc3ef80628d591ba1d907ddd125f8c8 to your computer and use it in GitHub Desktop.
An introduction to the wishbone-input-httpserver module
protocols:
json:
protocol: wishbone.protocol.decode.json
modules:
input:
module: wishbone_contrib.module.input.httpserver
protocol: json
red:
module: wishbone.module.output.stdout
arguments:
colorize: true
foreground_color: RED
green:
module: wishbone.module.output.stdout
arguments:
colorize: true
foreground_color: GREEN
routingtable:
- input.red -> red.inbox
- input.green -> green.inbox
protocols:
json:
protocol: wishbone.protocol.decode.json
modules:
input:
module: wishbone_contrib.module.input.httpserver
protocol: json
arguments:
resource:
'(green|red)':
users:
- bob
tokens:
- 6cdd782b63624c5ab6a6635112557a30
response: "200 How is the weather in {{tmp.input.params.city}}?"
htpasswd:
bob: $apr1$96XNBTbu$Gpw.UY6op/TG06Uba21ck/
htpasswd:
module: wishbone.module.input.inotify
arguments:
paths:
"/htpasswd":
- IN_CLOSE_WRITE
red:
module: wishbone.module.output.stdout
arguments:
colorize: true
foreground_color: RED
green:
module: wishbone.module.output.stdout
arguments:
colorize: true
foreground_color: GREEN
routingtable:
- input.red -> red.inbox
- input.green -> green.inbox
- htpasswd.outbox -> input._htpasswd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment