Created
May 16, 2017 04:12
-
-
Save jazzyjackson/3e54b203547a92b3ddccb02ced54a1a6 to your computer and use it in GitHub Desktop.
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 repl = require('repl') | |
const Koa = require('koa') | |
const app = new Koa() | |
app.context.defaultMsg = "Hello World" | |
app.use( ctx => ctx.body = app.context.defaultMsg ) | |
app.listen(3000) | |
repl.start({prompt: '> ', eval: myEval}); | |
function myEval(stdin, context, filename, stdout) { | |
stdout(eval(stdin)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment