Spaces:
Sleeping
Sleeping
Update server.js
Browse files
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);
|