Creating a Meteor Application

Learn how to create a boilerplate Meteorjs application.

Create a web application

It’s very easy to create a new application after installing the Meteor CLI tool. Open the terminal window or command prompt for a Windows machine at the location where we want to store the application. Run the command below to create a Meteor application with a React frontend:

//this creates a react app
 meteor create appName

Meteor works with major front-end frameworks like Svelte, React, Blaze, Vue, and soon. To use any front-end framework, simply append the framework name before our app name.

 meteor create --react appName
 meteor create --vue appName
 meteor create --svelte appName
 meteor create --vue appName

Running a Meteor application

Meteor creates all the necessary files for us. Change the directory to the app directory that was just created, and run the command below to start the application:

 meteor run

The command above runs the application on the default port, which is 3000. To run the application on a different port, add the port parameter to the meteor run command, like so:

 meteor run --port 4000

The app will now be available at localhost:4000

# This file contains information which helps Meteor properly upgrade your
# app when you run 'meteor update'. You should check it into version control
# with your project.

notices-for-0.9.0
notices-for-0.9.1
0.9.4-platform-file
notices-for-facebook-graph-api-2
1.2.0-standard-minifiers-package
1.2.0-meteor-platform-split
1.2.0-cordova-changes
1.2.0-breaking-changes
1.3.0-split-minifiers-package
1.4.0-remove-old-dev-bundle-link
1.4.1-add-shell-server-package
1.4.3-split-account-service-packages
1.5-add-dynamic-import-package
1.7-split-underscore-from-meteor-base
1.8.3-split-jquery-from-blaze
A simple Meteor application

Click the “Run” button to initialize the Meteor server. The web application above was made by running the meteor create command, which creates a React front-end boilerplate.

Meteor syncs all changes made to our app. Our React code is located inside the imports/ui directory, and the root component of the React app is the App.jsx file. Look at the files in the imports/ui directory and experiment. We can make changes in the application files and then click the “Run” button to enact those changes.