Using a Cakefile
We've gotten a little ahead of ourselves. We upgraded our application to use data from a database, but right now our database doesn't exist! While we might build some sort of import system or data entry interface to add records to our application in production, during development it's nice to be able to easily add a set of seed data. We already have this seed data, we just need a way to put it into our database.
CoffeeScript provides a simple but effective solution to these sorts of problems: Cakefiles. Cakefiles are inspired by the venerable Makefiles, the build system for C and friends. The premise of a Makefile and its variants (Ruby users will also be familiar with Rakefiles) is simple: it consists of various tasks which can be invoked individually from the command line. Each task definition contains instructions that will be run when the task is run. In a Cakefile, the task definitions and bodies are all written in CoffeeScript.
Think of a Cakefile as a very simple command...