Quick Start
We've got a few demos to show off MoQ in action. Everything runs on localhost in development, but in production of course you'll run these components across multiple hosts.
Start by cloning the repo:
git clone https://github.com/moq-dev/moq
cd moqThen pick your poison: Nix or not.
Option 1: Using Nix (Recommended)
The recommended approach is to use Nix. It's like Docker but without the VM; all dependencies are pinned to specific versions.
Install the following:
- Nix
- Nix Flakes
- (optional) Nix Direnv
Then run the demo:
# Runs the demo using pinned dependencies
nix develop -c just devIf you install direnv, then the Nix shell will be loaded whenever you cd into the repo:
# Run the demo... in 9 keystrokes
just devOption 2: Manual Installation
If you don't like Nix or enjoy suffering with Windows, then you can manually install the dependencies:
Then run:
# Install additional dependencies, usually linters
just install
# Run the demo
just devWhen in doubt, check the Nix Flake for the full list of dependencies.
What's Happening?
The just dev command starts three components:
- moq-relay: A server that routes live data between publishers and subscribers.
- moq-cli: A CLI that publishes video content piped from
ffmpeg. - demo: A web page with various demos.
Once everything compiles, it should open localhost:5173 in your browser.
WARNING
The demo uses an insecure HTTP fetch for local development only. In production, you'll need a proper domain and TLS certificate via LetsEncrypt or similar.
More Demos
Check out the full development guide for more demos and commands.
We have separate repos for the more difficult plugins to compile: