Update server.js
Browse files
server.js
CHANGED
|
@@ -6,12 +6,10 @@ const app = express();
|
|
| 6 |
app.get("/", async (req, res) => {
|
| 7 |
let browser;
|
| 8 |
try {
|
| 9 |
-
let { url
|
| 10 |
if (!url || !url.trim().startsWith("http")) return res.sendStatus(400);
|
| 11 |
|
| 12 |
-
const viewport = width
|
| 13 |
-
? { width: parseInt(width), height: parseInt(height) }
|
| 14 |
-
: { width: 3840, height: 2160 };
|
| 15 |
|
| 16 |
browser = await chromium.launch({
|
| 17 |
args: ["--incognito", "--single-process", "--no-sandbox", "--no-zygote", "--no-cache"],
|
|
|
|
| 6 |
app.get("/", async (req, res) => {
|
| 7 |
let browser;
|
| 8 |
try {
|
| 9 |
+
let { url } = req.query;
|
| 10 |
if (!url || !url.trim().startsWith("http")) return res.sendStatus(400);
|
| 11 |
|
| 12 |
+
const viewport = { width: 1920, height: 1080 };
|
|
|
|
|
|
|
| 13 |
|
| 14 |
browser = await chromium.launch({
|
| 15 |
args: ["--incognito", "--single-process", "--no-sandbox", "--no-zygote", "--no-cache"],
|