Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/grinnz/cah-cards

REST interface to CAH card database
https://github.com/grinnz/cah-cards

Last synced: 5 days ago
JSON representation

REST interface to CAH card database

Awesome Lists containing this project

README

        

# 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](https://metacpan.org/pod/Mojolicious::Command::daemon):

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

Or, you can start it under the [Hypnotoad](https://metacpan.org/pod/Mojo::Server::Hypnotoad) prefork server:

hypnotoad cah_cards.pl