And then I guarantee you, three weeks from now, you'll be walking down the street like, I could do this thing, right. It's one of those things you start making the LED blink, and that's very gratifying. So you can effectively build your own network connected musical devices, all right? So then once you start to wrap your head around the fact that you have browser technologies, server technologies, and hardware, right? There's this whole new spectrum of things that you can do.
And I did a little bit with a thing called web sockets which is every time the button got pressed, we know that buttons have an event and so then I submitted an event over the web socket to the browser, which then made sounds using the web audio API. One project that I did at one point was just basically just using the web audio API and as I turn knobs and press buttons on the hardware device, I was able to make the browser make sounds. All of the web APIs are available to us.
#NODEBOT COM PORT REDIRECT CODE#
But then also also being able to still do all the things that we can do in JavaScript, which is being able to run servers, being able to write client code and build UIs. The thing that I keep kinda harping on over and over again is, the cool thing about programming hardware with JavaScript is obviously programming hardware in our favorite language. It's not the experience I come to expect from the ten minutes that I have been running a web server on a small little commodity hobby board, right? One of the things I don't love about this is that we submit it, we look over, we reload a page. > Steve Kinney: Great, so we're able to submit post requests to a regular HTML form and change the color of an LED. Transcript from the "Add WebSockets for Real-Time" Lesson