diff --git a/.gitignore b/.gitignore index a070a88f..71ba6dd2 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,7 @@ apps/test-suite/node_modules/ apps/test-suite/.env apps/test-suite/logs -apps/test-suite/load-test-results/test-run-report.json \ No newline at end of file +apps/test-suite/load-test-results/test-run-report.json + +apps/playwright-service-ts/node_modules/ +apps/playwright-service-ts/package-lock.json \ No newline at end of file diff --git a/apps/playwright-service-ts/README.md b/apps/playwright-service-ts/README.md index 74984386..3e6d0aa1 100644 --- a/apps/playwright-service-ts/README.md +++ b/apps/playwright-service-ts/README.md @@ -13,6 +13,7 @@ This is a simple web scraping service built with Express and Playwright. ## Install ```bash npm install +npx playwright install ``` ## RUN @@ -39,4 +40,8 @@ curl -X POST http://localhost:3000/scrape \ }, "check_selector": "#content" }' -``` \ No newline at end of file +``` + +## USING WITH FIRECRAWL + +Add `PLAYWRIGHT_MICROSERVICE_URL=http://localhost:3003/scrape` to `/apps/api/.env` to configure the API to use this Playwright microservice for scraping operations. diff --git a/apps/playwright-service-ts/api.ts b/apps/playwright-service-ts/api.ts index 333d2158..90a4eb87 100644 --- a/apps/playwright-service-ts/api.ts +++ b/apps/playwright-service-ts/api.ts @@ -8,7 +8,7 @@ import { getError } from './helpers/get_error'; dotenv.config(); const app = express(); -const port = process.env.PORT || 3000; +const port = process.env.PORT || 3003; app.use(bodyParser.json());