What is Meteor?
You’ve heard people talk about Meteor recently. So here are a few things you should know about Meteor. Be careful when reading this because you will fall in love with it immediately:
- Meteor produces cross-platform code. Write once, run anywhere, from desktop to mobile platforms.
- With Meteor, your application is real-time by default. It integrates with MongoDB and uses the Distributed Data Protocol and a publish–subscribe pattern to automatically propagate data changes to clients.
- You can save a lot of time with smart packages. Packages are handled through Meteor’s package management site: AtmosphereJs
- It’s optimized for developer happiness. Beginning developers can quickly build something impressive, while advanced developers can appreciate Meteor’s flexibility.
- The community is extremely supportive.They organizes meetups, publishes free training materials, and offers help wherever possible.
Very cool, right? You can check out our products built with Meteor:
View, edit and share PDF files in the cloud: https://www.luminpdf.com/
The only app for raising money during your live stream: https://www.crowdr.tv/
Givepoint and more: https://dsv.boonapp.io/
“We aim to build a new platform for cloud applications that will become as ubiquitous as previous platforms such as Unix, HTTP, and the relational database.” – Meteor Development Group
Nowadays, there are lots of smart tools that help us build awesome things quickly and easily. Meteor is amongst of those smart tools. So why don’t we start using Meteor right now? 😀
How to install Meteor?
It’s totally simple!
OSX / LINUX
Install the latest official Meteor release from your terminal:
curl https://install.meteor.com/ | sh
Simply download and run the official Meteor installer: https://install.meteor.com/windows
Your first Meteor app
To create a Meteor app, simply open your terminal and run this command:
meteor create hello-world
Then you will see a folder named hello-world and several files have just been created:
Take a look at these files:
client/main.html # an HTML file that defines view templates
client/main.css # a CSS file to define your app's styles
package.json # a control file for installing NPM packages
.meteor # internal Meteor files
.gitignore # a control file for git
Now try to run your first Meteor app:
Let’s check it out using your web browser: http://localhost:3000/
You can play around with the demo app. Open your favorite editor (like Atom, Sublime Text, WebStorm…) and try editing the file client/main.html, then you will see your web page change immediately without refreshing! This is called hot code push, since Meteor uses data on the wire: the server sends data, not HTML, and the client renders it. I can’t tell you how much I love it, because before Meteor, I only study ASP.NET MVC and Java J2EE at school. Whenever I change the code on server side, I have to stop the app, edit, then restart it. It takes a lot of my time since my computer’s performance is quite bad. Thanks Meteor!
So far we’ve discovered the very basic of Meteor:
- What is Meteor
- How to Install
- Create and run a Meteor app
Next time you will know how to create a Meteor real-time chat app just in 30 minutes. Stay tuned!