Skip to content

Commit

Permalink
Merge pull request #442 from karlseguin/cli_commands
Browse files Browse the repository at this point in the history
Add explicit commands to binary
  • Loading branch information
krichprollsch authored Feb 25, 2025
2 parents 3f23e07 + 9519d3f commit a22e1bc
Show file tree
Hide file tree
Showing 4 changed files with 229 additions and 180 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
- name: run puppeteer
run: |
python3 -m http.server 1234 -d ./public & echo $! > PYTHON.pid
./lightpanda & echo $! > LPD.pid
./lightpanda serve & echo $! > LPD.pid
RUNS=100 npm run bench-puppeteer-cdp > puppeteer.out || exit 1
cat /proc/`cat LPD.pid`/status |grep VmHWM|grep -oP '\d+' > LPD.VmHWM
kill `cat LPD.pid` `cat PYTHON.pid`
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ COPY --from=0 /browser/zig-out/bin/lightpanda /bin/lightpanda

EXPOSE 9222/tcp

CMD ["/bin/lightpanda", "--host", "0.0.0.0", "--port", "9222"]
CMD ["/bin/lightpanda", "serve", "--host", "0.0.0.0", "--port", "9222"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ chmod a+x ./lightpanda
### Dump an URL

```console
./lightpanda --dump https://lightpanda.io
./lightpanda fetch --dump https://lightpanda.io
```
```console
info(browser): GET https://lightpanda.io/ http.Status.ok
Expand All @@ -73,7 +73,7 @@ info(browser): eval remote https://api.website.lightpanda.io/js/script.js: TypeE
### Start a CDP server

```console
./lightpanda --host 127.0.0.1 --port 9222
./lightpanda serve --host 127.0.0.1 --port 9222
```
```console
info(websocket): starting blocking worker to listen on 127.0.0.1:9222
Expand Down
Loading

0 comments on commit a22e1bc

Please sign in to comment.