There are many ways to launch Hanji. While platform packages should provide a user friendly way for starting Hanji, this page describes quickly the hidden side of the launch mechanism and how to start the application from a command line.
Several installations of Hanji on one machine might coexist. For example, a production (installed with pip, easy_install or setup.py) and a development environment (Hanji simply resides in a directory).
Just type in a terminal:
hanji_launcher.py
This is the standard way: it runs the installed package, on port 8899. When it is done, go to http://localhost:8899/ with your web browser.
This script is normally installed system wide by the install step of the setup.
The script run the Hanji server in the background, detaching from the terminal. To run in the foreground, use hanji_launcher.py -n.
Note
You can still run Hanji in debug mode with this script: just pass DEBUG=1 in your environment. This can be helpful when debugging packaging issues.
If Hanji was installed system-wide (see Install), then it is registered as a Twisted plugin. That makes it easy to launch Hanji with the application launcher twistd:
twisd -n hanji
To run it in the background, do not pass the -n option to twistd:
twistd hanji
By default, the web server listens at port number 8899. Point your web browser to: http://localhost:8899/ (of course, you might want to replace localhost by an IP address or valid host name for remote access). See also Options for changing the port number.
Usually 2 options are set:
twistd --pidfile=/path/to/pid_file --logfile=/path/to/log_file hanji
The pidfile stores the process number, the logfile is of course useful for tracking the activity of the server.
The command line options for launching the Hanji web server fit in 2 places:
twistd generic options (select a Twisted reactor, detach from terminal, setup the logging mechanisms, etc):
twistd --help
Hanji specific options (port, base directory for development installation, settings file, etc):
twistd hanji --help