vsTerminus / cah-cards

REST interface to CAH card database

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cah-cards

REST interface to CAH card database

Prerequisites

  • PostgreSQL 9.3+
  • Perl 5.10.1+

To install prerequisite Perl modules, you can simply use cpanminus:

cpanm --installdeps .

Or if you don't have cpanminus:

curl -L https://cpanmin.us | perl - --installdeps .

Setup

CAH card data is retrieved from a PostgreSQL database. Create a database named cah and a user named cah:

createdb cah
psql -c 'CREATE ROLE "cah" WITH LOGIN' cah

Import the card data from provided dump files into the database:

psql cah < dump/cah_cards.sql

Create a file named cah_cards.conf in the root directory to configure the connection, see cah_cards.conf.example.

Then, start the application as a daemon:

perl cah_cards.pl daemon -m production -l 'http://*:8080'

Or, you can start it under the Hypnotoad prefork server:

hypnotoad cah_cards.pl

About

REST interface to CAH card database

License:Artistic License 2.0


Languages

Language:PLpgSQL 99.2%Language:Perl 0.7%Language:Shell 0.0%