Skip to content

Instantly share code, notes, and snippets.

@yuanoook
Created September 17, 2020 10:59
Show Gist options
  • Save yuanoook/21a0bb9599cc0f48e4a31cfa6efd6baa to your computer and use it in GitHub Desktop.
Save yuanoook/21a0bb9599cc0f48e4a31cfa6efd6baa to your computer and use it in GitHub Desktop.
Function as a service
const Koa = require('koa');
const app = new Koa();
app.use(async ctx => {
const s = eval(ctx.request.query.s)
const r = eval(s)()
ctx.response.body = r
});
app.listen(3003);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment