Created
October 14, 2019 19:30
-
-
Save bardic/1741902a92864bc5c5d461a509b49319 to your computer and use it in GitHub Desktop.
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
| router | |
| .get('/cat', (ctx, next) => { | |
| ctx.body = "Hello" | |
| r.table('authors').run(connection, function(err, cursor) { | |
| if (err) throw err; | |
| cursor.toArray(function(err, result) { | |
| if (err) throw err | |
| console.log(ctx) | |
| //THIS PART DOESN'T WORK | |
| ctx.body += result[0].name | |
| }); | |
| }); | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment