aripbae commited on
Commit
f7ba5b3
·
verified ·
1 Parent(s): 33add58

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +5 -2
index.js CHANGED
@@ -117,11 +117,14 @@ app.get(
117
  console.error(e)
118
  o = e
119
  } finally {
 
 
 
120
  res.send(
121
  format(
122
  'StdErr: %s<br><br>StdOut: %s',
123
- o.stderr.trim(),
124
- o.stdout.trim()
125
  )
126
  )
127
  }
 
117
  console.error(e)
118
  o = e
119
  } finally {
120
+ const parse = (str) => str
121
+ .replace(/\n/g, '<br>')
122
+ .trim()
123
  res.send(
124
  format(
125
  'StdErr: %s<br><br>StdOut: %s',
126
+ parse(o.stderr),
127
+ parse(o.stdout)
128
  )
129
  )
130
  }