simoncck commited on
Commit
20ab29e
·
verified ·
1 Parent(s): 7c046f8

Update server.js

Browse files
Files changed (1) hide show
  1. server.js +3 -2
server.js CHANGED
@@ -56,10 +56,11 @@ app.post('/login', async (_req, res) => {
56
  }
57
 
58
  const b64 = out.png.toString('base64');
59
- res.json({
60
  ok: true,
61
  screenshot_b64: 'data:image/png;base64,' + b64.slice(0), // ready for <img src=...>
62
- });
 
63
  });
64
 
65
  console.log('🛰️ Public URL will be:', HOSTNAME);
 
56
  }
57
 
58
  const b64 = out.png.toString('base64');
59
+ /* res.json({
60
  ok: true,
61
  screenshot_b64: 'data:image/png;base64,' + b64.slice(0), // ready for <img src=...>
62
+ }); */
63
+ res.type('png').send(out.png);
64
  });
65
 
66
  console.log('🛰️ Public URL will be:', HOSTNAME);