Getting started with Meteor.js

Meteor makes it simple to develop real-time web apps in a matter of hours.Meteor.js is an open-source platform build on Node and MongoDB. To develop applications with meteor you do not need to learn new languages, If you have a working knowledge of JavaScript and Mongo DB you can easily develop applications with Meteor.

Meteor allowing developers to write both their front end and back end code in Javascript. And to Store Data meteor uses Mongo DB.

Folder names mater to the meteor.Anything you put in a folder called ‘server’ will only be run on the server. And anything in a ‘client’ folder will be run on the client. The code in other folders, such as ‘lib’, are run on both client and server side.

One of the coolest thing about Meteor is, it is hot-pushes changes to JS, CSS, and HTML files to the browser, automatically, without making you reload the page.

How to install

Installing meteor on windows straight-forward, just you need to download and run the official Meteor Installer. Just follow the prompts and you will get it.

If you are using Mac OS X or Linux, then you need to run the following command

That is it for installation.

Create a Project

Let’s create the Meteor application and start it.

To create the app, open your terminal and type:

This will create a new folder with application name(Here blog) with all of the files that a Meteor app needs:

To run created app, from the command line go to project root folder and run the following command

Open your web browser and go to http://localhost:3000 to see the app running.

Templates

Meteor have is own template system called HandleBar. Handlebars templates look like regular HTML, with embedded handlebars expressions. A handlebars expression is a {{, some contents, followed by a }}. Handlebars HTML-escapes values returned by a {{expression}}. If you don’t want Handlebars to escape a value, use the “triple-slash”, {{{.

Database

Events

Sessions

Forms

Broadcasting – Publish and Subscribe

Methods

Application and folder structure

Packaging and Deployment

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

Arjun
I am Arjun from Hyderabad (India). I have been working as a software engineer from last 7+ years, and its my passion to learn new things and implement them as a practice. Aside from work, I likes gardening and spending time with pets.
DMCA.com Protection Status