meteor Electrify - Compiling Meteor as a Locally Installable App Using Electrify on a Meteor Application


Example

Let's download a Meteor Todos example project, using a Linux shell (command line) script, to test out Electrifying a project for the first time:


Requirements for this section:

Git

apt-get install git-all

There are many ways to install Git. Check them out here.

  • git is a version control system for files. They can be stored remotely (i.e., online) in public repositories (GitHub being a rather famous one) or private repositories (BitBucket provides limited free private repositories, as an example). Read more [here][5].

#!/usr/bin/bash

# Change this parameter to choose where to clone the repository to.
TODOSPATH="/home/user/development/meteor-todos"

# Download the repository to the $TODOSPATH location.
git clone https://github.com/meteor/todos.git "$TODOSPATH"

# Change directory (`cd`) into the Todos project folder.
cd "$TODOSPATH"

We should now have a project folder named 'meteor-todos', at the location specified within the TODOSPATH parameter. We've also changed directory (cd) into the project folder, so let's add Electrify to this project!

# It's really this simple.
electrify

That's right - a single word command, and our project is ready. Permissions may cause errors for you when trying to run electrify as a command, in wihch case try sudo electrify to override the permissions.

However, do attempt to resolve these permission issues - it is not good practice to unnecessarily sudo (which I'd elaborate upon, but I could write a whole other topic on why that is!)