-
Notifications
You must be signed in to change notification settings - Fork 5
/
INSTALL
62 lines (36 loc) · 1.96 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
INSTALLATION:
To install Cato just follow these steps. Note that Cato depends on the
MDB2 PHP PEAR package, and also the Smarty templating engine.
1) If you don't already have PHP installed, install it.
2) Install the PHP PEAR package MDB2. This is needed for database access.
3) Install the Smarty templating software (http://www.smarty.net/).
Smarty is used for all template processing.
4) Install this application somewhere in your filesystem, like this:
/Users/al/Cato
5) Modify your PATH to include our bin directory
PATH=/Users/al/Cato/bin:$PATH
6) Create an alias to our db.php script to make it easier to run:
alias db=/Users/al/Cato/bin/db.php
7) Copy the 'example' directory to a location where you'd like to work
for your application. For instance, if you're working on a project
named Foo, in a directory named /Users/al/Projects/Foo, you can
copy the 'examples' directory into that root directory and rename it
to 'cato', like this:
/Users/al/Projects/Foo/cato
8) In this new 'cato' working directory, edit the app.config file to work
for your application. The main thing you need to configure are the
database parameters. Everything after that is technically optional,
though I'm sure you'll want to customize things for your project.
I recommend running some initial tests with Cato to make sure it's
running properly, and once you confirm that it is, you'll want to edit
the template files to create the CRUD output you want.
To run a simple Cato test, try a command like this, assuming you have
a database table named 'users':
db gen model User
Or, if you have a database tables named 'peeps', you can run this command
instead:
db gen model User peeps
For more information on Cato commands, please see the README file.
USING CATO:
If everything has gone well, congratulations, you should be ready to run
Cato database CRUD commands, as shown in the README file.