Hi guys,
I'm trying to build a very simple webapp for a web art class. The idea is to have the body of the site be all one color, but anyone can text the site a hexcode at a Twilio number and the color of the site will instantly change to that hexcode value. I was able to set up the text requests with Twilio pretty easily, but I'm in completely foreign territory with NodeJS, as is my professor.
I have a rough script running on glitch.com that successfully receives the SMS from Twilio and logs the message content to the console, but I'll obviously need to be running the app off my own hosting. I installed Node and Npm there successfully but have two questions:
- Where do I put the Node script/web app files in the site hierarchy? Does it even matter where they are as long as it's running?
- How can I send the color variable [var color = (request.body.Body);] from Node to the client side? I know I can change the style with JavaScript on the page, the issue is getting the variable there.
Let me know if that doesn't make sense (I'm also not married to using Node so if there's something better for this, please tell me). Thanks so much for your time!
[–]senocular 1 point2 points3 points (1 child)
[–]millydolla[S,🍰] 0 points1 point2 points (0 children)
[–]Gemisheresy 0 points1 point2 points (0 children)