Created
March 1, 2016 15:23
-
-
Save lukehoban/4e8d1e7a65ae77613c6d to your computer and use it in GitHub Desktop.
My first hook.io microservice
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A simple hello world microservice | |
// Click "Deploy Service" to deploy this code | |
// Service will respond to HTTP requests with a string | |
import sleep from 'then-sleep'; | |
export default async function (hook) { | |
await sleep(500); | |
hook.res.end("Hello world!"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment