Skip to content

Instantly share code, notes, and snippets.

@Alex-Tideman
Last active October 20, 2015 18:39
Show Gist options
  • Save Alex-Tideman/83fc7e1b289d604750bb to your computer and use it in GitHub Desktop.
Save Alex-Tideman/83fc7e1b289d604750bb to your computer and use it in GitHub Desktop.
Getting Started with Meteor

Getting Started with Meteor

What is Meteor?

  • Create full-stack web and mobile apps with just Javascript
  • Galaxy platform for superfast deployments
  • Open source,

How to Get Started

  • Let's create an app (to-do list)
  • meteor create simple-todos a. simple-todos.js # a JavaScript file loaded on both client and server b. simple-todos.html # an HTML file that defines view templates c. simple-todos.css # a CSS file to define your app's styles d. .meteor # internal Meteor files

Calling Data

<ul>

  {{#each tasks}}

    {{> task}}

  {{/each}}

</ul>


<template name="task">

  <li>{{text}}</li>

</template>

Templates

if (Meteor.isClient) {

// This code only runs on the client

Template.body.helpers({

  tasks: [

  { text: "This is task 1" },

  { text: "This is task 2" },

  { text: "This is task 3" }

   ]

 });

}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment