Townie

I have a love-hate relationship with Node.js. I want to like the platform for building apps but I have always disliked the way it handles the asynchronous behavior needed for web servers. Callback Hell is a real place. Catch-Try statements everywhere is messy and unappealing. The addition of promises cleaned it up a little, but one could still end up trying to pick apart long chains of promise calls, which is not ideal. Enter Node 7.6 with default async/await support. Suddenly writing a complex series of DB calls in a controller was elegantly handled by marking the controller as async and adding await to any method that the controller needed to wait on. Async/await coupled with ES6 is changing my mind about Node.js as a viable back-end option. JavaScript is feeling more Pythonic the more I use these new features. I therefore decided to try and build a larger, more complete project.

I looked around but did not find any code examples I really liked. No tutorials or Node.js examples were leveraging the cleaner syntax of async/await. Then I stumbled upon Wes Bos’s excellent Learn Node video series. I had been looking for an excuse to throw some 💰 his way after thoroughly enjoying his free 30 Days of JavaScript course. Learn Node did not disappoint. His lessons were concise and insightful. Wes built this course with best in class technologies including Express.js, Pug, Passport.js, Mongoose, MongoDB, SASS, and Webpack. Every example used as much ES6 syntax as each piece of middleware would allow. The result was an in depth portrayal of what a well-designed Node.js project can look like.

Townie is the the Yelp clone I built while working through Learn Node. I have made a few tweaks to add Geolocation and plan to expand the API to support a React Native app which I am currently building. This project is exciting, and I am looking forward to digging into it as my new side-project.