twitchdev / extensions-hello-world Goto Github PK
View Code? Open in Web Editor NEWThe Simplest Extension in the (Hello) World
License: Apache License 2.0
The Simplest Extension in the (Hello) World
License: Apache License 2.0
Hello, I am very new here, but I was wondering if there is any plan/ instructions on how to run this on Linux.
I'm having a terrible time getting the developer rig running on my Windows 8.1 box. I can't create a project with any of the projects offered as starter code (Hello World, etc.). When I try I get the really unhelpful error "Something went wrong. Please try saving your project again".
I can create a completely empty project by unselecting the "use code" option. But I really need some starter code to work with. So I downloaded this repo and executed a npm install
command. Despite that I had to use npm
to install the hapi
package. But now when I try to follow the ReadMe directions and create the certificates I get the following error on the first command:
C:\Users\Robert\Documents\GitHub\ME\TWITCH\Extensions\extensions-hello-world>node scripts/ssl.js
module.js:549
throw err;
^
Error: Cannot find module 'C:\Users\Robert\Documents\extensions-hello-world\scripts\ssl.js'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3
How do I fix this and is there a reason I'm having such a difficult time with this? Also, Node.JS on windows can't seem to find any of the EXT_* environment variables so I am currently forced to use the command line variables.
Lastly, you might want to edit the ReadMe to tell people the owner ID is just the Twitch user ID associated with the Twitch channel tied to the client ID associated with the extension. curl
is not a resident command on a Windows box so you can't use it with a default Win config. I'm guessing you do most of your dev on a Mac?
Fortunately I have MSYS installed so I could get to CURL there, but many of your other Windows users will have to wrestle with that requirement. I second that other thread that requests Linux support for the developer rig.
The hello world code doesn't have a build tool since it's just basic html/js.
So is there a recommended way where I can specify a different localhost vs hosted backend URL when I'm uploading my assets to deploy on twitch?
Right now, localhost:8081
is hardcoded in the code.
The curl command provided in the README now results in {"error":"Unauthorized","status":401,"message":"OAuth token is missing"}. It would be helpful to explain the steps that the current Twitch API requires to get the example running.
extensions-hello-world/public/config.html
Line 13 in 8b183b2
It looks like this file is missing from the repo. After running through setup, I get this error when hosting via the Developer Rig:
yarn run v1.7.0
$ node ./scripts/ssl.js && node ./scripts/host.js -l hello-world/public/ -p 8080
SSL Cert already exists at /home/code/git/developer-rig/ssl/selfsigned.crt
Serving assets from https://localhost.rig.twitch.tv:8080
[Sun, 24 Jun 2018 21:30:32 GMT] - "GET /config.html?anchor=config&language=en&mode=config&state=testing&platform=web"
[Sun, 24 Jun 2018 21:30:32 GMT] - "GET /config.js"
[Sun, 24 Jun 2018 21:30:32 GMT]ERROR: "GET /config.js"
{ Error: Not found
at notFound (/home/code/git/developer-rig/node_modules/union/lib/routing-stream.js:88:13)
at dispatch (/home/code/git/developer-rig/node_modules/union/lib/routing-stream.js:105:14)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:106:13)
at module.exports.emit (events.js:208:7)
at /home/code/git/developer-rig/node_modules/union/lib/routing-stream.js:114:23
at Object.exports.(anonymous function) (/home/code/git/developer-rig/node_modules/ecstatic/lib/ecstatic/status-handlers.js:37:5)
at fs.stat (/home/code/git/developer-rig/node_modules/ecstatic/lib/ecstatic.js:340:24)
at FSReqWrap.oncomplete (fs.js:152:21) status: 404 }
According to the comment in logSuccess the hello-world sample should use the broadcast functionality of PubSub to trigger the actual color change.
extensions-hello-world/public/viewer.js
Lines 56 to 60 in b5eb29a
But due to createRequest pointing to updateBlock instead of logSuccess the current implementation effectively does not need broadcasts when tested with a single user.
extensions-hello-world/public/viewer.js
Lines 14 to 22 in b5eb29a
I am not very familiar with curl, but the curl command given in the readme is
curl -H 'Client-ID: <client id>' -X GET 'https://api.twitch.tv/helix/users?login=<owner name>'
This format did not work for me (newbie, on Windows) and the following format did, with double quotes for the header and no quotes at all for the actual url.
curl -H "Client-ID: <client id>" -X GET https://api.twitch.tv/helix/users?login=<owner name>
I don't know if this is just a typo in the readme (in which case I would have just tried to fix it) or if it depends on platform. Just trying to save future versions of me a little speedbump.
All of the documentation linked to for windows certificate generation is out of date. the documentation refers to using a tool that has is no longer available (makecert.exe) and any links within the microsoft documentation meant to point to new tools generate 404s.
It looks like they're trying to push us to https://docs.microsoft.com/en-us/powershell/module/pkiclient/new-selfsignedcertificate which may be a better link to provide in the documentation.
extensions-hello-world/public/viewer.js
Line 72 in 500ad0d
Hi,
I tried to test this example but there is something i don't get it. Why this line above is never triggered ?
And because this is never triggered, the circle don't update when there is multiple clients.
I was curious after using this example how do I actually go about bundling this up and deploying it to Twitch. My local tests worked great but as soon as I tried the hosted test it just errors out. I had just made a zip file of the root directory and uploaded it.
Hi,
Trying to learn how to build an extension.
Is live reloading working? I can see that inert
is listed as a dependency which should make reloading available via hapi server. But as I make a change to /local/live_config.html I still have to restart yarn host
in order for the update to show. Or should I do something with yarn?
Also why exactly do we need the local and online folders? I know it is being served from local folder if we run frontend with -l
option. And what is the difference between config.html, live_config.html, panel.html
After deploying my front end to twitch as a zip file. Shall I deploy my backend to any server hosting of my choice? Or how does that work? I will need to have a Mongo DB database for keeping some streamer inputted data.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.