Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
138 lines (97 sloc) 4.03 KB
perl 5.12.0 or later
DBIx::Class::Tree::NestedSet from
ISBN::Country from
A postgresql database server, and ideally three databases, one each for
development, testing and production.
For example under Debian, you'd install
aptitude install postgresql-8.4 postgresql-client-8.4 postgresql-server-dev-8.4
And then create the databases:
su - postgres
# create a database user:
createuser -S -D -R -P quelology_db
# you will be asked for a password. Enter one and write it down somewhere
# create the actual databases
createdb --encoding UTF-8 --owner quelology_db quelology-dev 'Quelology development database'
createdb --encoding UTF-8 --owner quelology_db quelology-test 'Quelology test database'
createdb --encoding UTF-8 --owner quelology_db quelology-prod 'Quelology production database'
# set them up to support triggers:
createlang -d quelology-dev plpgsql
createlang -d quelology-test plpgsql
createlang -d quelology-prod plpgsql
# stop being user 'postgres':
Create a file called config.json in the quelology source tree root,
with contents like that (and replace <password> with the actual
database password:
"web_secret": "<long, random string goes here>",
"dev": {
"dbname": "quelology-dev",
"dbhost": "localhost",
"dbuser": "quelology_db",
"dbpass": "<password>"
"test": {
"dbname": "quelology-test",
"dbhost": "localhost",
"dbuser": "quelology_db",
"dbpass": "<password>"
"prod": {
"dbname": "quelology-prod",
"dbhost": "localhost",
"dbuser": "quelology_db",
"dbpass": "<password>"
Set permissions so that no other use can read your passwords:
chmod 600 config.json
Populate the development database with a schema:
psql -h localhost -U quelology_db quelology-dev < schema.sql
With a bit of luck, you should now be able to run
perl web/quelology daemon
And get a response like this:
Mon May 9 09:48:22 2011 info Mojo::Server::Daemon:297 [29749]: Server
listening (http://*:3000)
Server available at
Now point your web browser to and admire a nearly empty
page :-).
Kill the server again by pressing Ctrl+C in the console where you started it.
To avoid having to enter your database passwords whenever you import or export
data (which also happens during automated unit tests), create a file called
.pgpass in your home directory, with contents like this:
(without the leading spaces, and again substitute <password> for the actual
database password).
You can import a bunch of data which makes development much more fun:
zcat quelolog-latest.sql.gz | psql -h localhost -U quelology quelolog-dev
Now create the search indexes (currently requires postgres 8.4 or newer):
perl tools/
And start the web server again:
perl web/quelology daemon
And browse
Some features of quelology require access to the Amazon advertising API.
This is necessary for the amazon search, and for importing raw publications
from amazon.
To use these features, you must sign up at to obtain a "token" and a "secret key".
Add those two strings to the config.json file, with keys "amazon_token"
and "amazon_secret_key".
Some tools in the tools/ directory require additional modules to run.
Most developers don't need those, many concern additional data mining
tasks. Those additional modules are
Have fun!