Starting Perl web app development with Dancer

I’m starting to build a web-app with Perl. After some reading, I was recommended to use Dancer as an all-in-one web server and MVC framework for Perl. Below is the steps I followed to install and launch Dancer.

nn

Install YAML (you can do this after you install Dancer, but doing it first will prevent you from receiving an ugly warning message):

nn

$ curl -L http://cpanmin.us | perl - --sudo YAMLn

nn

To install Dancer:

nn

$ curl -L http://cpanmin.us | perl - --sudo Dancern

nn

Navigate to the directory where you want to create your app:

nn

$ cd $pathn

nn

Use the dancer helper app to setup the folder structure:

nn

$ dancer -a $web_app_namen

nn

I received a bunch of warnings that the program was trying to create files that already existed. Very weird because it was creating files in a brand new directory for the first time. Anyways, I suppose that I should report this as a bug.

nn

Navigate to your new directory with your web-app:

nn

$ cd $web_app_namen

nn

Launch the webserver:

nn

$ ./bin/app.pln

nn

You can access it by navigating your web browser to:

nn

http://0.0.0.0:3000n

nn

Overall, I’m** extremely** impressed with how user-friendly the installation and launch process was. I am still pretty noob at *nix. My experience with building software from source has usually been a nightmare due to missing dependencies and compilation errors, along with having to install a bunch of stuff that I don’t understand to directories that I have never heard of (and will probably never find again).

nn

Hats off to the Dancer dev team and community for a great product so far. I’m looking forward to experimenting (and hopefully making money) from it!

Leave a Reply

Your email address will not be published. Required fields are marked *