https://github.com/dallegoet/playwright-server
Playwright server booster with stealth plugin and ublock / i still dont care about cookies chromium extensions
https://github.com/dallegoet/playwright-server
Last synced: 3 months ago
JSON representation
Playwright server booster with stealth plugin and ublock / i still dont care about cookies chromium extensions
- Host: GitHub
- URL: https://github.com/dallegoet/playwright-server
- Owner: dallegoet
- License: apache-2.0
- Created: 2023-11-13T11:49:14.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-13T12:01:11.000Z (over 1 year ago)
- Last Synced: 2025-01-14T13:36:05.469Z (4 months ago)
- Language: JavaScript
- Size: 3.41 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Run with Docker
## Run the server without security
```bash
docker run --env-file .env.local -p 3000:3000 dallegoet/playwright-server
```## Securize websocket connection using an access token
Create a `.env.local` file with the following content:
```bash
ACCESS_TOKEN=your_access_token
```Then run the following command:
```bash
docker run --env-file .env.local -p 3000:3000 dallegoet/playwright-server
```# Connect from a playwright client
```typescript
const browser = await playwright.chromium.connect("ws://localhost:3000", {
headers: {
authorization: "Bearer your_access_token",
},
slowMo: 400,
});const page = await browser.newPage();
await page.goto("https://playwright.dev/");
await page.waitForTimeout(2000);
await page.screenshot({ path: "example.png" });
await page.close();
await browser.close();
```