by valchonedelchev



Deploy Perl applications in seconds.

Step 1

Generate app:

mojo generate lite_app

Step 2

Create a Makefile.PL with your dependencies:

mojo generate makefile

Alternately, you may create a cpanfile that lists dependencies instead:

requires 'Mojolicious';

Step 3

Create an executable file called Perloku which runs a server on the port given as an enviroment variable:

echo '#!/bin/sh' > Perloku
echo './ daemon --listen http://*:$PORT' >> Perloku
chmod +x Perloku

Step 4


git init
git add .
git update-index --chmod=+x Perloku (only if using Windows)
git update-index --chmod=+x (only if using Windows)
git commit -m "Initial version"
heroku create -s cedar --buildpack
git push heroku master


Counting objects: 5, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (5/5), 808 bytes, done.
Total 5 (delta 0), reused 0 (delta 0)

-----> Heroku receiving push
-----> Fetching custom buildpack... done
-----> Perloku app detected
-----> Vendoring Perl
       Using Perl 5.16.2
-----> Installing dependencies
       --> Working on /tmp/build_19tm6pb8ch1qa
       Configuring /tmp/build_19tm6pb8ch1qa ... OK
       ==> Found dependencies: Mojolicious
       --> Working on Mojolicious
       Fetching ... OK
       Configuring Mojolicious-2.48 ... OK
       Building Mojolicious-2.48 ... OK
       Successfully installed Mojolicious-2.48
       <== Installed dependencies for /tmp/build_19tm6pb8ch1qa. Finishing.
       1 distribution installed
       Dependencies installed
-----> Discovering process types
       Procfile declares types   -> (none)
       Default types for Perloku -> web
-----> Compiled slug size is 12.4MB
-----> done, v5 deployed to Heroku

 * [new branch]      master -> master