Meteor Installation

Share:

Meteor is an open-source platform for web, mobile, and desktop used by over half a million developers around the globe. Any web application requires an intermix of numerous advancements. Meteor stipulates all of it for you and minus the hassle of stitching these all together. Meteor compiles all the technologies that you need to make a connection between your users interface and the database.

Let's get started by installing Meteor on your computer.

Meteor supports almost all the popular operating systems including Windows, MacOS, and Linux. The installation steps vary slightly based on the operating system.

Installing Meteor on MacOS or Linux

To install Meteor on a MacOS or Linux machine, you may need to open your terminal and input the following command:

curl https://install.meteor.com/ | sh

This command uses "curl" to download the Meteor install script and "sh" to run the script in the system shell. The installation will begin and Meteor will be installed as a command line tool. The installation may take a bit of time, based on your network speed, since it downloads the entire Meteor framework from the internet.

Installing Meteor on Windows

Installation on Windows is done via Chocolatey, the package manager. If Chocolatey is not installed, you can install it by following instructions on the Chocolatey Install page. Once Chocolatey is installed, open your command prompt and enter the following command:

choco install meteor

Just like in MacOS and Linux, this will install Meteor as a command line tool.

Success of the installation can be tested by simply typing meteor into your terminal or command prompt. If the installation has been successful, Meteor will show its version, help menu and available commands.

Finally, let us make a simple test to verify that everything is good to go. We will create a very simple web application using Meteor. You can create a new application by using the meteor create command, followed by the name of the application.

meteor create my_first_meteor_app
cd my_first_meteor_app

Replace "my_first_meteor_app" with your desired application name. This will create a new folder with the same name as your application in your current directory, containing all files that a Meteor application needs.

Next, use the meteor command to run your application.

meteor

Your application now should be running at http://localhost:3000. Open your web browser and type that address in. You should see your new Meteor application running.

What's next?

Let's give a quick look at the files auto-generated by Meteor.

client/main.js        # a [JavaScript](https://stackbay.org/modules/learn-javascript) entry point loaded on the client
client/main.html      # an [HTML](https://stackbay.org/modules/learn-html-and-css) file that defines view templates
client/main.css       # a [CSS](https://stackbay.org/modules/learn-html-and-css) file to define your app's styles
server/main.js        # a [JavaScript](https://stackbay.org/modules/learn-javascript) entry point loaded on the server
package.json          # a control file for installing NPM packages
.meteor               # internal Meteor files
.gitignore            # a control file for git

At the first sight, this structure divides the front-end (client) from the back-end (server). This separation is one of the basic organization premises in Meteor.

To adapt our example, let’s change the content of client/main.html to this:

<head>
  <title>Hello, Meteor!</title>
</head>

<body>
  <h1>Welcome to Meteor!</h1>
  <p>You've just created a new Meteor app.</p>
  <p>So, let’s start building Star Wars scene features.</p>
</body>

Meteor dynamically updates the running application in your browser.

The Meteor installation process is pretty straightforward. Installing Meteor by using the appropriate installation command for your operating system then creating a new application with the meteor create command is all you need to get started.

In the following chapters, we will mainly use examples from a blockbuster movie, Star Wars. We'll keep referring to the application we created, adding more features, assumption requirements, and models inspired by Star Wars. Stay tuned!

0 Comment


Sign up or Log in to leave a comment


Recent job openings