Gotron is a web application framework for PHP developers.
Gotron powers the Go Try It On website and the API for the Go Try It On iPhone application. It has borrowed a number of concepts from Ruby on Rails and added others where necessary.
- PHP 5.4+
- Ruby 1.9+ (For Compass and Standalone Migrations)
- MySQL
The simplest way to create a new project is to clone this repository and then use the included generator, like so:
git clone git@github.com:gotryiton/gotron.git
cd gotron
bin/gotron new blog ~/
That will create the directory blog
in your home directory, create the necessary files that Gotron uses, and add Gotron and its dependencies as submodules.
Then, to start the PHP server:
cd ~/blog
bundle install
bundle exec compass compile --config ./config/compass_config.rb
php -S localhost:9001 -t ./public
Open a browser and go to http://localhost:9001. You should see Welcome to your new Gotron app!
If you want Compass to continually compile CSS you can run bundle exec guard
.
To run the Gotron test suite:
- Install MySQL and make sure it is running. (On a Mac, install homebrew and run
brew install mysql
) - Run:
mysql -u root -e "CREATE DATABASE gotron_development; \ CREATE USER 'test'@'localhost' IDENTIFIED BY 'test'; \ GRANT ALL PRIVILEGES ON gotron_development.* TO 'test'@'localhost' WITH GRANT OPTION;"
(This command may need to be modified depending on the setup of your MySQL instance. If you have any important data on there you should **definitely** set a root password.)
- From the root directory run
bin/test
.