Quick start with Perl and Mojolicious

To get started with Mojolicious, just as quick and dirty as with Scala and Play Framework, you need only these:

Once they’re all installed, its this easy:

  • Open Git Bash
  • Clone my Mojolicious/Perl vagrant repository: git clone https://github.com/ian-kent/vagrant-perl-mojolicious-mongodb.git mojoserver
  • Change directory: cd mojoserver
  • Start the virtual machine: vagrant up (might take a while, installing Perl is slow!)
  • Once it’s complete, connect using SSH: vagrant ssh
  • Create a new Mojolicious app: mojo generate app MyApp
  • Change directory: cd my_app
  • Start your application: ./script/my_app daemon
  • View your new Mojolicious site in a browser: http://localhost:3000

It installs the latest version of Mojolicious and Mango along with Perl 5.18.2 and cpanminus using Perlbrew.

To help you get started, the Vagrantfile also installs MongoDB and sets up port forwarding for port 3000 and 8080 (Mojolicious with Morbo and Hypnotoad) and port 27017 (MongoDB)