Code Monkey home page Code Monkey logo

extensions-hello-world's People

Contributors

colbydude avatar davecusatis avatar gsmith104 avatar klowner avatar roschler avatar tenchumaru avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

extensions-hello-world's Issues

Linux support

Hello, I am very new here, but I was wondering if there is any plan/ instructions on how to run this on Linux.

Cannot find module ssl.js

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.

Recommended way to change backend url for local vs hosted test

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.

OAuth API change

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.

Missing file: config.js

<script src="config.js" type="text/javascript"></script>

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 }

createRequest assigns the wrong success callback

According to the comment in logSuccess the hello-world sample should use the broadcast functionality of PubSub to trigger the actual color change.

function logSuccess(hex, status) {
// we could also use the output to update the block synchronously here,
// but we want all views to get the same broadcast response at the same time.
twitch.rig.log('EBS request returned '+hex+' ('+status+')');
}

But due to createRequest pointing to updateBlock instead of logSuccess the current implementation effectively does not need broadcasts when tested with a single user.

function createRequest(type, method) {
return {
type: type,
url: 'https://localhost:8081/color/' + method,
success: updateBlock,
error: logError
}
}

curl command in docs

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.

Deploying to Twitch

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.

Live reload and difference between HTML files

Hi,

Trying to learn how to build an extension.

  1. 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?

  2. 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

  3. 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.