NAME

Toadfarm::Manual::RunningToadfarm - Command line options

DESCRIPTION

This manual goes through different options on how to start your Toadfarm application.

Basics

You can see the different options by simply running your application with no options:

$ /path/to/your-script
$ /path/to/your-script help

Actions

In addition to all the default commands, Toadfarm adds some more:

Init

Your script can be used as an init-script. Example script:

#!/path/to/your/perl
### BEGIN INIT INFO
# Provides:          toadfarm
# Required-Start:    $local_fs $network mysql postgresql
# Required-Stop:     $local_fs $network mysql postgresql
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Toadfarm web application
### END INIT INFO

use Toadfarm -dsl;
# ...
start;

You can put the code above in /etc/init.d/your-script:

# Create a toadfarm script in init.d
$ sudo $EDITOR /etc/init.d/your-script

# Make it executable
$ sudo chmod +x /etc/init.d/your-script

# Make it start on boot
$ sudo update-rc.d your-script defaults;

Crontab

If you want to use crontab to start your script, you can do it with this line:

* * * * * /path/to/your-script start 1>/dev/null 2>/dev/null

The trick here is to use "start" which will only start your server and not hot deploy it if it's already running.

Other ways

It is possible to start the server using the standard Mojolicious tools as well:

$ /path/to/your-script daemon --listen http://*:5000
$ morbo /path/to/your-script
$ hypnotoad /path/to/your-script

SEE ALSO

See also Toadfarm::Manual::Introduction and Toadfarm::Manual::Config.

AUTHOR

Jan Henning Thorsen - jhthorsen@cpan.org