Coder Social home page Coder Social logo

vagrant-meteor's Introduction

vagrant-meteor

Vagrant configuration for a virtual machine that can run Meteor apps. Can be used on Windows, Mac OS X or Linux.

Getting started

The following instructions are optimized for Windows users. If you have questions or problems after reading and doing the following instructions please open an issue and I will try to address your issue.

Installation

  1. Install Cygwin with the packages openssh and rsync.
  2. Add the <CYGWIN_INSTALL_DIR>/bin folder to your PATH.
  3. Install VirtualBox.
  4. Install Vagrant (1.6.1 or newer is needed).
  5. Download this repository and unpack the downloaded zip file.
  6. Install and start the Vagrant VM by executing start.bat. It will take a little bit to download and install everything. Read the next part "File Synchronisation" while it installs. ;-)

File Synchronisation

The folder is synchronised to two places on the guest. Each synchronized folder has a special purpose.

Rsync - one way synchronisation for starting the Meteor app

The folder is synchronised with Rsync to the guest folder /vagrant.

  • You must use this folder to start the Meteor app.
  • You must use this folder for mrt add and mrt update.
  • Changes won't be synchronized back to the host and will be deleted after the next sync.

Shared Folder - two way synchronisation for file editing

The folder is also synchronised with the VirtualBox shared folder feature to the guest folder /vagrant2.

  • Use this folder to make changes in the guest that should be synchronized with the host.
  • Use this folder to create an app with mrt create.
  • After you added or updated smart packages you must copy the smart.json and smart.lock file from /vagrant to /vagrant2 with (see open issue):
cp -f /vagrant/<MY_APP>/smart.* /vagrant2/<MY_APP>/
cp -f /vagrant/<MY_APP>/.meteor/packages /vagrant2/<MY_APP>/.meteor/
  • Cannot be used to start the Meteor app.
  • Cannot be used for mrt add, mrt install or mrt update

Create your first Meteor app

Do the following steps in the SSH terminal that opened with executing the start.bat script.

# Create the app
cd /vagrant2
mrt create my-app --example leaderboard
# Add an Atomosphere package
cd /vagrant/my-app
mrt add bootstrap3-less
# Copy the changed smart.json and smart.lock to the host
cp -f /vagrant/my-app/smart.* /vagrant2/my-app/
# Start the app
mrt

Now open the URL http://localhost:3000 in your browser. It should show you the leaderboard example. Also look into the vagrant-meteor folder. It has automatically synchronised the my-app folder. You can now make changes to the app that will automatically be synchronized with the Vagrant VM.

If you find this useful I would appreciate a Gittip.

Further reading

Check out the wiki for more details.

vagrant-meteor's People

Contributors

probableprime avatar sanjosolutions avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.