Spaces:
Paused
Paused
Vo Hoang Minh commited on
Commit ·
bbbc331
1
Parent(s): ce8f202
up
Browse files- src/server.mjs +1 -10
src/server.mjs
CHANGED
|
@@ -25,12 +25,6 @@ const GL = new GoLogin({
|
|
| 25 |
remote: false,
|
| 26 |
});
|
| 27 |
|
| 28 |
-
const wsUrl = await GL.start({
|
| 29 |
-
uploadCookiesToServer: true,
|
| 30 |
-
autoUpdateBrowser: false,
|
| 31 |
-
});
|
| 32 |
-
console.log({wsUrl});
|
| 33 |
-
|
| 34 |
app.get("/api/ping", (c) => {
|
| 35 |
return c.json({
|
| 36 |
message: "Hello",
|
|
@@ -43,10 +37,7 @@ app.get("/api/start", async (c) => {
|
|
| 43 |
// Tạo profile mới
|
| 44 |
|
| 45 |
// Khởi động trình duyệt với profile đã tạo
|
| 46 |
-
const wsUrl = await GL.
|
| 47 |
-
uploadCookiesToServer: true,
|
| 48 |
-
autoUpdateBrowser: false,
|
| 49 |
-
});
|
| 50 |
|
| 51 |
return c.json({
|
| 52 |
success: true,
|
|
|
|
| 25 |
remote: false,
|
| 26 |
});
|
| 27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
app.get("/api/ping", (c) => {
|
| 29 |
return c.json({
|
| 30 |
message: "Hello",
|
|
|
|
| 37 |
// Tạo profile mới
|
| 38 |
|
| 39 |
// Khởi động trình duyệt với profile đã tạo
|
| 40 |
+
const wsUrl = await GL.createStartupAndSpawnBrowser();
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
return c.json({
|
| 43 |
success: true,
|