First of all, thanks for setting up this sample project to help people get started with Twitch extensions.
This project is included in the dev rig as a sample project, therefore I assume most people who find this project, probably are running this project from that tool.
The README for this project does not include a section on how to run this project in the context of using the dev rig. As a result, there is some friction between actually running this extension natively and with the dev rig.
For example, the README says to run this project with "yarn start" which runs the assets at localhost:8080, while the dev rig tries to fetch assets from localhost.rig.twich.tv:8080. Because it might not be obvious for someone who hasn't looked within the package.json, there should be a section that instructs developers to run with "yarn host" from within the dev rig tool.
Additionally, the generate_cert shell script only creates a self-signed cert with a SAN of localhost. The hostname validation fails if we are running this at localhost.rig.twitch.tv, so that script should be modified to include both hostnames.
openssl req \
-newkey rsa:4096 \
-days 1001 \
-nodes \
-x509 \
-subj "/C=US/ST=California/L=San Francisco/O=LULZCorp/OU=web/CN=localhost" \
-extensions SAN \
-config <( cat $( [[ "Darwin" = "$(uname -s)" ]] && echo /System/Library/OpenSSL/openssl.cnf || echo /etc/ssl/openssl.cnf ) \
<(printf "[SAN]\nsubjectAltName=DNS:localhost,DNS:localhost.rig.twitch.tv")) \
-keyout "${DIR}/${NAME}.key" \
-out "${DIR}/${NAME}.crt"
First of all, thanks for setting up this sample project to help people get started with Twitch extensions.
This project is included in the dev rig as a sample project, therefore I assume most people who find this project, probably are running this project from that tool.
The README for this project does not include a section on how to run this project in the context of using the dev rig. As a result, there is some friction between actually running this extension natively and with the dev rig.
For example, the README says to run this project with "yarn start" which runs the assets at localhost:8080, while the dev rig tries to fetch assets from localhost.rig.twich.tv:8080. Because it might not be obvious for someone who hasn't looked within the package.json, there should be a section that instructs developers to run with "yarn host" from within the dev rig tool.
Additionally, the generate_cert shell script only creates a self-signed cert with a SAN of localhost. The hostname validation fails if we are running this at localhost.rig.twitch.tv, so that script should be modified to include both hostnames.