Skip to content

Commit

Permalink
Fix local development. (kixelated#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
kixelated authored Oct 12, 2023
1 parent d078e3d commit e3c4969
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
13 changes: 11 additions & 2 deletions dev/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# dev
# Local Development

This is a collection of helpful scripts for local development ONLY.
This is a collection of helpful scripts for local development.

## Setup

Expand Down Expand Up @@ -70,6 +70,10 @@ This listens for WebTransport connections on WebTransport `https://localhost:444
./dev/relay
```

It will print out a URL when you can use to publish. Alternatively, you can use `dev/pub` instead.

> Publish URL: https://quic.video/publish/?server=localhost:4443
### moq-pub

The following command runs a development instance, broadcasing `dev/source.mp4` to WebTransport `https://localhost:4443`:
Expand All @@ -78,6 +82,11 @@ The following command runs a development instance, broadcasing `dev/source.mp4`
./dev/pub
```

It will print out a URL when you can use to watch.
This will contain a random broadcast name so the below link won't work:

> Watch URL: https://quic.video/watch/REPLACE_WITH_NAME?server=localhost:4443
### moq-api

The following commands runs an API server, listening for HTTP requests on `http://localhost:4442` by default.
Expand Down
4 changes: 2 additions & 2 deletions dev/relay
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ ARGS=""

# Connect to the given URL to get origins.
# TODO default to a public instance?
if [ -n "$API" ]; then
if [ -n "${API-}" ]; then
ARGS="$ARGS --api $API"
fi

# Provide our node URL when registering origins.
if [ -n "$NODE" ]; then
if [ -n "${NODE-}" ]; then
ARGS="$ARGS --node $NODE"
fi

Expand Down

0 comments on commit e3c4969

Please sign in to comment.