If you want to start with a new technology there is always the challenge of setting up your development environment. When I started with Haskell a few years ago I fiddled around with different compiler versions, Cabal and in the end managed to wrack my whole system. Having learned that lesson I don’t recommend installing everything on your local machine when you start to experiment and use a virtual machine instead.
Before starting you have to install VirtualBox, Vagrant and the Vagrant Berkshelf plugin. After all requirements are installed you can clone the repository and start building your VM.
$ git clone https://github.com/JanAhrens/yesod-quickstart.git $ cd yesod-quickstart/ $ vagrant up
Depending on your internet connection and your system you have to wait between 30 and 60 minutes until Vagrant has downloaded and build all packages.
If you survived the initial setup, you’re ready to create a Yesod project. You have to connect to the virtual machine and use the yesod command to scaffold your application.
$ vagrant ssh # cd /vagrant # yesod init --bare # cabal install && yesod devel
After the Yesod development server is up and running, you can use your default web browser and point it to
Vagrant will mount the directory containing the
Vagrantfile within the VM under
This means that you don’t have to get comfortable with
emacs over that SSH connect - just use your favorite
editor on your host system instead. Head over to the Yesod book to deep dive into Yesod.