Skip to content
Henri edited this page Apr 10, 2014 · 7 revisions

The easiest way to develop in Opa on most platforms is to use a vagrant box. Install vagrant (and VirtualBox on some platforms).

Setup

Download the opa box torrent and run from that directory

vagrant box add opa opa.box
# Assuming install to ~/opa
mkdir ~/opa 
cd ~/opa
vagrant init opa

The box is a linux system running in a VM that contains a pre-built Opa system with all dependencies. Once the box is created, run:

vagrant up
vagrant ssh

to start the VM and log into it.

Test your setup

Opa is installed and in user path, so you can just run

opa file.opa
./file.js

to compile and run an Opa program. Note that tutorials are preinstalled in your home directory.

Host-VM interaction

If you're new to vagrant, note that the host directory is mounted under /vagrant in the VM, so you can leave Opa programs in your host and just keep a console in the VM to compile and run your apps.