This is the basic template for a Merrymake service.
The merrymake.json
file defines one hook main/hello
, and maps it to the action handleHello
.
The app.py
file defines the handler handleHello
.
The handler first parses the payload, then replies with a hello-message, including the payload.
Start the simulator in one terminal:
$ mm sim 3000
In another terminal call:
$ curl --silent -d "World" -H "Content-Type: text/plain" http://localhost:3000/rapids/hello
Hello, World!
First push the code, either through Git or with the command
$ mm deploy
If you don't have a key yet, make one now:
$ mm key
Now you can trigger using:
$ curl --silent -d "World" -H "Content-Type: text/plain" https://rapids.merrymake.io/[key]/hello
Hello, World!