Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

FOSS4G 2011 Talk :: real-time async geo apps in nodejs

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 .gitignore
Octocat-spinner-32 Procfile
Octocat-spinner-32 README.md
Octocat-spinner-32 map.html
Octocat-spinner-32 package.json
Octocat-spinner-32 server.coffee
README.md

What is Nodejs?

What is CoffeeScript?

CoffeeScript is a language that compiles down to JavaScript. This means that code in .coffee files are not interpreted at run time, but are compiled beforehand into .js files.

CoffeeScript can be written for all implementations of JavaScript, whether it's for Node.js or the browser.

Watch this screen cast.

$ coffee -v

server

package.json

  • Use by npm (node package manager) to describe you application and allow automatic installation of dependencies needed to run you application.

  • Think of it as an application manifest for a node project.

  • It describes verions, name and dependencies.

  • The most important things in your package.json are the name and version fields. Those are actually required, and your package won't install without them.

name

  • Check the npm registry if you are creating a public project.

  • Non-url-safe characters will be rejected.

Minimal package.json:

  {
    "name": "example_2", //
    "version": "0.0.0",
    "dependencies": {
      "socket.io" : "*"
    }
  }

Install:

  $ npm install

  socket.io@0.8.2 ./node_modules/socket.io 
  ├── policyfile@0.0.4
  ├── redis@0.6.6
  └── socket.io-client@0.8.2

server.coffee

client

Something went wrong with that request. Please try again.