From: Michael Orlitzky Date: Sun, 18 Apr 2010 18:32:16 +0000 (-0400) Subject: Added the start-server helper script, and a README file explaining the Pylons app. X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fcensus-tools.git;a=commitdiff_plain;h=0b427824c4fa2ca2f7731d0c50a4bf64c90efbe0 Added the start-server helper script, and a README file explaining the Pylons app. --- diff --git a/www/maps/docs/README b/www/maps/docs/README new file mode 100644 index 0000000..7f6043e --- /dev/null +++ b/www/maps/docs/README @@ -0,0 +1,43 @@ +i. About + +The 'maps' directory contains a Pylons[1] project. Pylons is a +framework for developing web applications in Python. To "run" the +application, you need to host the maps project on a web +server. Fortunately, there is a lightweight Python web server provided +for you that can do this (at least locally. + +The command to start the server is, + + paster serve --reload development.ini + +which tells the "paster" command that it should load the environment +contained in the development.ini file. The --reload argument simply +tells the application to reload automatically if any of its files are +changed. + +A helper script, start-server will run this command for you. By +default, the web server process will run in the foreground. You can +tell it to run in the background by ending the command with a '&', +e.g., + + ./start-server & + +Paster will default to running on http://127.0.0.1:5000, which you can +visit in your browser. + + +[1] http://pylonshq.com/ + + +ii. Installation + +Pylons is supplied by most major Linux distributions, but +unfortunately, we require version 0.9.7 or greater. If your +distribution has a previous version, you can get away with using +easy_install to install version 0.9.7. For example, on Ubuntu 9.04, + + sudo apt-get install python-setuptools + sudo easy_install Pylons==0.9.7 + +Here, the first command installs python-setuptools, the package that +contains the easy_install utility. diff --git a/www/maps/start-server b/www/maps/start-server new file mode 100755 index 0000000..a894579 --- /dev/null +++ b/www/maps/start-server @@ -0,0 +1,3 @@ +#!/bin/bash + +paster serve --reload development.ini \ No newline at end of file