Skip to content

Instantly share code, notes, and snippets.

@diorahman
Created May 27, 2016 22:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diorahman/7863148ea0b6d203f4bc8fd56f78c0bb to your computer and use it in GitHub Desktop.
Save diorahman/7863148ea0b6d203f4bc8fd56f78c0bb to your computer and use it in GitHub Desktop.
import { boot, send } from 'ysera';
const delay = () => {
return new Promise((resolve) = > {
setTimeout(resolve, 1000);
})
}
const fn = async (req, res) => {
await delay();
send(res, 200, 'OK');
};
boot(fn, 3000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment