Live video on the AT Protocol
79
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #371 from streamplace/natb/document-public-host

devx: add reverse proxy instructions to dev guide

authored by

Eli Mallon and committed by
GitHub
0d0e4178 b6ea7231

+48 -4
+48 -4
js/docs/src/content/docs/guides/start-contributing/streamplace-dev-setup.md
··· 22 22 - pkg-config 23 23 - Rust 24 24 - Working C and C++ compilers: `gcc` on Linux or `clang` (via Xcode) on macOS. 25 + - Reverse proxy 26 + 27 + ## Reverse Proxy 28 + 29 + Due to the nature of ATProto, a requirement for developing for Streamplace is 30 + using a reverse proxy so that your PDS can connect with your development 31 + environment. 32 + 33 + Popular options include: 34 + 35 + - [Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/) 36 + (recommended) 37 + - [zrok](https://zrok.io/) (self hostable, recommended) 38 + - [Pangolin](https://github.com/fosrl/pangolin) (self-hostable) 39 + - [ngrok](https://ngrok.com/) 40 + 41 + **Example usage:** 42 + 43 + - Cloudflare Tunnel: `cloudflared tunnel --url http://127.0.0.1:38080` 44 + - zrok: `zrok share http 127.0.0.1:38080` 45 + - Pangolin: (if you have a site set up) 46 + `newt --id my-id --secret my-secret --endpoint 127.0.0.1:38080` 47 + - ngrok: `ngrok http 38080` 48 + 49 + > **Tip:** A static tunnel URL is preferred for consistency, especially if you 50 + > need to share your dev environment or if you want to stay logged in between 51 + > proxy restarts. Look at the docs for your preferred reverse proxy for more 52 + > information. 25 53 26 54 ## Get Started 27 55 ··· 49 77 50 78 By default, the `make dev` Streamplace node will proxy incoming requests 51 79 front-end requests — basically every endpoint that's not at `/api` or `/xrpc` — 52 - through to the Streamplace app dev server. Usually, you'll usually want to be 53 - hacking on both of those things at once. If this isn't the case — like you're 54 - making exclusively backend changes — and you want to launch the node with the 55 - embedded frontend, you can override the pertinent command line argument: 80 + through to the Streamplace app dev server. Usually, you'll want to be hacking on 81 + both of those things at once. If this isn't the case — like you're making 82 + exclusively backend changes — and you want to launch the node with the embedded 83 + frontend, you can override the pertinent command line argument: 56 84 57 85 ```shell 58 86 make dev && ./build-darwin-arm64/streamplace --dev-frontend-proxy="" 87 + ``` 88 + 89 + If you're using a proxy server, you may want to set your tunnel URL as the 90 + public host URL so you can get authentication working. You may do that via the 91 + `--public-host` argument. 92 + 93 + Similarly, if you're working on mobile and need authentication, use the 94 + `--app-bundle-id` argument with your bundle NSID in `app.json` (for Devplace, 95 + the id is `tv.aquareum.dev`). 96 + 97 + Here's an example with both: 98 + 99 + ```shell 100 + make dev && ./build-darwin-arm64/streamplace \ 101 + --public-host your.proxy.example.com \ 102 + --app-bundle-id tv.aquareum.dev 59 103 ``` 60 104 61 105 ### Streamplace App