Created
September 17, 2020 10:59
-
-
Save yuanoook/21a0bb9599cc0f48e4a31cfa6efd6baa to your computer and use it in GitHub Desktop.
Function as a service
This file contains 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
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