Follow these steps to get Hello World running in Local Mode in the Rig. This guide assumes you have either cloned the Rig from GitHub or downloaded the Zip file from Twitch.
The scripts\run.cmd command file will first run command files to install and configure the Developer Rig before running it. If the Developer Rig is already installed and configured, running these two command files will have no effect.
scripts\install.cmdscripts\configure.cmd
You may invoke these two command files before invoking scripts\run.cmd.
The scripts\install.cmd command file installs the following prerequisites. If you already have these prerequisites, running this command file will have no effect. You may install these yourself instead.
- Node LTS. If you already have Node installed, it must be at least version 6.
- Yarn.
- Python 2.
- Git for Windows. Its shell is used in subsequent steps.
The scripts\configure.cmd command file performs the following actions. If the Developer Rig is already configured, running this command file will have no effect. You may perform these actions yourself instead. Note that the scripts\configure.cmd command file invokes the scripts\install.cmd command file.
- Install run-time dependencies.
- Open a command prompt. It does not need to be elevated.
cd path\to\developer-rigyarn install
This takes about half a minute.
- Clone and configure the "Hello World" extension from GitHub.
cd path\to\developer-rigyarn extension-init -d ..\my-extension
This will clone the Hello World example from GitHub. You may replace ..\my-extension with a different directory name here and in subsequent steps.cd ..\my-extensionnpm install
- Add
127.0.0.1 localhost.rig.twitch.tvto the HOSTS file.- Open an elevated command prompt.
ECHO 127.0.0.1 localhost.rig.twitch.tv>> "%SystemRoot%\System32\drivers\etc\hosts
- Create CA and Developer Rig and localhost SSL certificates.
cd path\to\developer-rigscripts\make-cert- Close the elevated command prompt and return to the non-elevated command prompt.
In addition to running the above command files, the .\scripts\run.cmd command file performs the following actions to launch the Developer Rig.
- Create a panel extension manifest file.
cd path\to\developer-rigyarn create-manifest -t panel -o ..\panel.json
- Host the front-end extension asset directory.
yarn host -d ..\my-extension\public -p 8080 -l
..\my-extension\public is the public folder of the hello-world example extension created in the previous step. NOTE: this command will not exit.
- Visit https://localhost.rig.twitch.tv:8080\panel.html. You will see
Hello, World!in the browser window. - Open a new command prompt and run these commands to run your Hello World back-end.
cd path\to\my-extensionnode services\backend -l ..\panel.json
..\panel.json is the path to the file created in step 3.iv above. NOTE: this command will not exit.
- Visit https://localhost:8081. You will see some JSON describing a 404 response in the browser window.
- Open a new command prompt and run these commands to run the Developer Rig.
cd path\to\developer-rigyarn start -l ..\panel.json
..\panel.json is the path to the file created in step 1.ii above NOTE: this command will not exit.
- Verify the Developer Rig is working.
- Sign in with your Twitch credentials.
- Click the
+button. The "Add a new view" panel will appear. - Select the
Broadcasterviewer type and clickSave. The Broadcaster view will appear. - Click
Yes, I would. Verify the color changes and there is output to match that request in the second command prompt. - Click the
+button again. The "Add a new view" panel will appear again. - Select the
Logged-Out Viewerviewer type and clickSave. The Logged-Out Viewer view will appear. - Click
Yes, I wouldin the new view. Verify the color changes in both views and there is output to match that request in the second command prompt.
When you are done using the Developer Rig, you may either close all opened command prompts or press Ctrl-C in all of them.