Name
Bigtop::Docs::QuickStart - The fastest ways to Gantry apps with Bigtop
From the Command Line Alone
Suppose you want to keep track of your relatives phone numbers and their children's birthdays. After installing sqlite, Gantry, and Bigtop, type:
bigtop -n Phone 'family(name,phone,+email)<-child(name,birth_day:date)'
cd Phone
./app.server
We call the definition in the single quotes the 'kickstart,' it's a description of the data model. See Bigtop::ScriptHelp::Style::Kickstart
for additional details on the syntax for kickstarts. Here there are two tables. family has name, phone, and optional email columns. child has name and birth_day which is a date.
If you don't have sqlite, you'll need to build your database. If your database engine of choice is PostgreSQL or MySQL, you can follow these instructions...
PostgreSQL
cd Phone
createdb app.db -U some_power_user
psql app.db -U regular_user < docs/schema.postgres
./app.server -d Pg -u regular_user -p password
mysql
cd Phone
msyqladmin create app.db -u root -p
mysql -u regular_user -p app.db < docs/schema.mysql
./app.server -d mysql -u regular_user -p password
In all cases, once you start app.server
, it will print URLs where you may point your browser to start using the app.
From a PostgreSQL Database
If you already have a PostgreSQL 8 database called yourdb, and would like a CRUD app for it:
bigtop -n YourApp -s Pg8Live 'dbi:Pg:dbname=yourdb' user pass
cd YourApp
./app.server -d Pg -n yourdb -u user -p pass