Ada Developers Academy Capstone: Day 16

I’m so happy that I finally fixed my server issue! It’s a shame that one of my soldering points became undone though. I spend the rest of the day without power to LEDs. Luckily USB powers the Feather, so I was still able to clean up my code a bit.

I decided that I really did want to code the Feather and my API to depend less on hard-coded data for colors, so I made a git branch of the working code in order to have a sandbox to play with. In that branch I removed the hard-coded data and figured out how to parse the data from my React front end in my C++ code so that I just ended up with RGB to plug into the LED code. It’s complex. Before I pushed the code to production, I knew I needed to test it. The trouble is, that my Feather can’t do a http request to localhost, so I have to have a live development url. … I’m really wishing that I had started with two environments; staging and production. Since I didn’t though, I now had to set up a development.

I thought this would work How to Set Up a Staging Environment for Your Existing Heroku App, alas fork is no longer a command in the Heroku CLI. Along the route of searching, I found Heroku Review Apps. By creating a pull request, I created a temporary staging environment. Awesome! Then I just plugged it all together…

Success! I now have cleaner code!

All I need to do is test it with working LEDs. I have my fingers crossed.

Making a Demo Video