5.1 Command Line

Usage:

aspen [options] [command]

Aspen takes one optional positional argument, command, which must be one of: start, status, stop, restart, or runfg. The default is runfg, which causes Aspen to run in the foreground, sending all messages to stdout.

start, status, stop, and restart control Aspen as a daemon, via a pidfile. If the website root has a directory named __ (that's two underscores; the magic directory), then the pidfile is at __/var/aspen.pid. Otherwise, the pidfile is created in /tmp. When run as a daemon, stdout and stderr are redirected to __/var/aspen.log if __ exists, and to /dev/null otherwise. The __/var directory will be created if it does not exist. The permission mode of the pidfile is set to 0600; likewise with the logfile, unless it is /dev/null.

The Aspen distribution includes a script in etc/aspen_bash_completion that can be used to configure the bash shell to autocomplete from among Aspen's arguments. See the source for more information.

Aspen's command-line options are as follows:

Option Description Default
-a/--address=address The address to which Aspen should bind. If address begins with a dot or a forward slash, then it is interpreted as an AF_UNIX socket. If it contains more than one colon, it is seen as an AF_INET6 address. Otherwise, it is interpreted as AF_INET. If address begins with a colon, then the AF_INET loopback address is assumed. 0.0.0.0:8080
-m/--mode=mode One of debugging, development, staging, or production. In debugging and development modes, Aspen will restart itself any time configuration files or module source files change on the filesystem. development
-r/--root=root The directory containing the website for Aspen to serve. .

See Also:

mode
Aspen uses the mode module to model the application life-cycle. It is available to your applications at aspen.mode

Aspen is copyright © 2006-2007 by Chad Whitacre and contributors, and is offered under the MIT license.