O'Reilly logo

CoffeeScript Programming with jQuery, Rails, and Node.js by Michael Erasmus

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Let's get started

To get going, we'll do the following steps:

  1. Create a folder for our application.
  2. Specify our app dependencies using a package.json file.
  3. Install our dependencies.
  4. Create an app.coffee file.
  5. Run our app for the first time.

package.json

Create a new folder named todo. Inside this folder, we'll create a file with the name package.json. Add the following code to this file:

{
  "name": "todo",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node app"
  },
  "dependencies": {
    "express": "3.0.0beta6",
    "jade": "*",
    "socket.io": "*",
    "coffee-script": "*",
    "connect-assets": "*"
  }
}

This is a simple JSON file that serves as an application manifest and is used to tell npm which dependencies you rely on in your application. Here, we're using ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required