refactor to avoid node v6 issue where the process ends before process.stdout is flushed

This commit is contained in:
Lloyd Brookes
2016-05-04 12:17:44 +01:00
parent 30885115b0
commit 4af6fa7901
3 changed files with 72 additions and 58 deletions

View File

@ -2,7 +2,7 @@ module.exports = {
response: function (ctx) {
return new Promise((resolve, reject) => {
setTimeout(() => {
ctx.body = `<h1>You waited 2s for this</h1>`
ctx.body = '<h1>You waited 2s for this</h1>'
resolve()
}, 2000)
})