Locally testing Extensions

https://dev.twitch.tv/docs/extensions#testing-your-extension I was reading this link here which shows how I can test my extension on twitch but it doesn’t tell me how I can upload my code or test it locally on my laptop/desktop without going to twitch.

You need a HTTP server running off your machine and then edit an extension version to point to that.

Some of use NGROK to tunnel thru and handle SSL Terminate. But a http://localhost/ should work as the base URI just needs some faff to deal with SSL fun times.

I did also look at the boilerplate code on GitHub and I do see code for a server running off the backend. Would I just fire up the server using the backend code and serve the static front end files? I’m somewhat new to JS. Thanks for helping me!


I managed to start up the server and testing with both NGROK and localhost. However, it seems like the server isn’t returning anything? I’m just doing a basic
app.get("*", (req, res) => { return "Hello World"; });
to test if it works. docker ps shows>8080/tcp.

app.get("*", (req, res) => { res.send(“Hello World”); });

Oh I realized I have to visit https://localhost:8080. I’ll play with ngrok to point to that as it only points to localhost:8080 at the moment. Also, for extensions, the streamer would visit say https://localhost/config.html to setup the extension and https://localhost/live_config.html for live config and viewers would see an iframe at https://localhost/viewer.html? Thanks!

1 Like

config.html is for a proper config page for the extension
live_config (optional) is for a panel on the dashboard
viewer is for the viewer yes

You don’t have to call them that you can change it in the extension version manager

thanks a lot man!