A virtual envirnment for running KYPO games visualizations
- NodeJS & npm
- Http-server
- Git
- Git Aware Prompt
NB. This is a 64 bit install. If you have a 32 bit system, this will not work.
- Download and install Vagrant from VagrantUp.com
- Download and install VirtualBox from Virtualbox.org
- In the root of the project, type
vagrant up
(this will take a loooong time, you have run the consele as an administrator) - Login to the machine by typing
vagrant ssh
- Run the app by typing
runall
That's it. The app is now running.
- server runs on localhost:5000 (on your host machine) -> farwarded to port 5000 on the VM
- client runs on localhost: 4201 (on your host machine) -> forwarded to 4200 on the VM
You can kill both processes by typing killall node
(this kills all node processes).
- to pause the VM in its current state, use
vagrant suspend
(in the Vagrant root folder, outside the VM) - to halt the VM (as if shutting down the computer), use
vagrant halt
- to completely remove the virtual machine type in
vagrant destroy
- to start it again use
vagrant up
More details in Vagrant Documentation.
The KypoViz-client
and KypoViz-server
folders are shared between the host and the virtual machine. Their content can be found on /opt/dev/
in the virtual machine. That way you can edit the source code in the host, but run the development environment in vagrant.
This is fairly simple. In a terminal, go to your Vagrant directory and type vagrant ssh
. That will connect you to the Vagrant box and you can control it. Your user is vagrant
and you have passwordless sudo access.
If this doesn't work on Windows with the native Commnad prompt, use Cmder instead.