Skip to content

Instantly share code, notes, and snippets.

@makevoid
Created June 16, 2012 12:39
Show Gist options
  • Select an option

  • Save makevoid/2941240 to your computer and use it in GitHub Desktop.

Select an option

Save makevoid/2941240 to your computer and use it in GitHub Desktop.
Hello meteor with coffeescript

Prereqs:

  • node and npm
  • coffee-script npm package

Install meteor:

curl install.meteor.com | /bin/sh

Clone/copy these files into a directory

cd into it and then:

meteor js

What I like about meteor js:

  • same code for server and client code == less code == big win?
  • auto reloading of everything

need to try more...

root = global ? window
if root.Meteor.is_client
root.Template.hello.greeting = ->
"Welcome to FirstApp."
root.Template.hello.events = "click input": ->
console.log "You pressed the button!!"
<head>
<title>meteor</title>
</head>
<body>
{{> hello}}
</body>
<template name="hello">
<h1>Hello World!</h1>
{{greeting}}
<input type="button" value="Click" />
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment