Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

NewLeafDigital Apps in Node.js

branch: master
README.md

NewLeafDigital Apps

Built in a node.js+mongoDB stack by freelance web developer Ben Buckman

Hosted at apps.newleafdigital.com.

Code on GitHub: nld-apps-hq

About Ben

Ben Buckman is the founder of New Leaf Digital, a development shop specializing in the Drupal CMS/framework and now Node.js.

If you are looking for Node.js work, please contact us.

The Apps

  • Spanish Flashcards: Create flashcards of English-Spanish word translations. Randomly play your flashcards until you get them all right. Look up new words with the WordReference API.

  • Interactive Lists: Create to-do lists, shopping lists, or any other kinds of list. Share your lists with your friends. As you add and remove items from the list, everyone else sees it immediately in real-time.

Evolution of the apps

These apps evolved over time as I learned node.js. They began with the Spanish Flashcards app, on which I learned the basics of node, express, and MongoDB-node integration. I then built the Interactive Shopping Lists app as a proof of concept using socket.io.

I then decided to bring them together into a suite of apps, to demo good production code. To authenticate into the suite, I used everyauth with Facebook Connect, and Mongoose for the model. That effort became the Auth sub-app.

To bring the 4 apps (primary/HQ, auth, flashcards, lists) together, there were a few options: a parent app proxying to child apps running independently; vhosts (requiring separate DNS records); or using Connect/Express's "mounting" capability. Mounted apps were the most complex option, but offered the best opportunity to learn the deep innards of Express, and the proxy solution was unclear, so I went with mounted apps.

Along the way I refactored constantly and hit brick walls dozens of times. I rebuilt Lists to handle multiple users and shared lists, added Bootstrap for aesthetics, tied everything to auth, and refactored all the Jade views to share a common layout.

Thanks

Thanks to everyone who wrote all the underlying node.js code and modules! It's an incredibly exciting community. Special thanks to Brandon Hall's boilerplate for helping me get started with everyauth, which made the rest possible.

License

I am making this code available as a demonstration of production Node.js code, and for others to learn, but not for others to copy and host as-is. This project is therefore licensed under a Creative Commons Attribution-NonCommercial-NoDerivs license. Within the terms of that license, feel free to learn from my code, and suggest improvements.

Enjoy!

Something went wrong with that request. Please try again.