Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Kevin Korte
Kevin Korte
28,148 Points

Thanks TTH for teaching me how to build this micro web app

So this is for me to gloat a bit :) but also more importantly inspire fellow developers on similar paths around me.

I wrote this little web app, as I currently work for a home builder. Wind and dust are a big problem in our area, and so it's important to for use to stay ahead of the wind, and get water on dirt when the wind kicks up.

I wrote this in about 20~25 hours. It's fairly simple. This is what it does on the back end.

It checks the current local weather forecast aprox every 30 minutes. If the current windspeed is greater than 10 mph, it logs the event on the webpage. If the app hasn't sent an alert within the last 6 hours, and it's not between 10pm and 6am it will send an email that turns into a SMS text alert to our field guys cell phones. If it has sent an alert in the last 6 hours, or it's between 10pm and 6pm, it just simply logs the even and doesn't send an alert.

Similar with the forecasted weather. It check the forecast approx every 4 hours, and if any hour in the forecast has forecasted winds over 10 mph, it pulls the first occurrence, logs it, and than uses the same logic to decide if it should send an alert or not. Has an alert for forecasted weather happened in the last 6 hours, and is it between 10pm and 6am.

It's a ruby project, I use sendgrid for email delivery which turns into a SMS (way overkill, but I wanted an excuse to try sendgrid for the first time), and I use https://www.wunderground.com/weather/api/ for my weather information.

It is hosted on Digital Ocean, on a $5 per month box. Console foundations FTW. This was another excuse to try my hand at setting up my own digital ocean droplet, and I learned a lot. But it was surprisingly easy with the amount of guides and help out there.

There are a lot of different reports and alerts I can send, or modify the logic when it should send.

I had fun building it, and wanted to share. Now on to bigger and better web apps!

Here is the domain:

3 Answers

Kevin Korte
Kevin Korte
28,148 Points

Thanks Jason, it ended up being pretty fun.

Jay Padzensky
Jay Padzensky
4,731 Points

Well done, it looks great! Hopefully you learned a ton in the process, too :)

Kevin Korte
Kevin Korte
28,148 Points

Yeah, I learned digital ocean wasn't as scary of a server environment as I thought. It was like ripping a bandaid off. The angst and anticipation of total failure before doing anything was the worst part. Once I walked through their tutorial, modified the config files, and restarted the services, and I had a live website, I realized, it wasn't that bad.