- PHP 5.3+ for Laravel project
- PHP 5.4+ for Way/Generators, if you have 5.4+ you can uncomment Way/Generators in /app/config/app.php
- Apache
Clone the repository:
git clone https://github.com/iRail/hyperRail.gitRun composer update. If you do not yet have composer, get it here: http://getcomposer.org
If you get any errors concerning MCRYPT, please refer to the following links:
- Mac OSX: http://stackoverflow.com/questions/16830405/laravel-requires-the-mcrypt-php-extension
- Ubuntu:
bash sudo apt-get install php5-mcrypt
Optional, but can be useful.
chmod -R 777 app/storageIn /app/config/app.php set the following to your personal hostname/preferences:
'url' => 'http://irail.dev', // with http
'url-short' => 'irail.dev', // without http
If 'vagrant' is not yet installed on your machine, get it here: https://www.vagrantup.com/downloads
vagrant upThis may take some time, but afterwards you can connect to the virtual database.
If 'grunt' is not installed on your machine, please visit: http://gruntjs.com/getting-started Grunt also requires 'compass' so if this is also not installed, please visit: http://compass-style.org/install/
Now run the following command in the root directory of Hyperrail:
npm install
bower install
composer install
grunt
Later on:
composer updateBshaffer's library works with refresh tokens. Go to
/vendor/bshaffer/oauth2-server-php/src/OAuth2/Controller/ResourceController.php:
and comment te next section:
public function getAccessTokenData(RequestInterface $request, ResponseInterface $response)
{
...
//elseif( time() > $token["expires"] ){
// $response->setError(401, 'invalid_token', 'The access token provided has expired');
//}
...
}
This makes sure our tokens won't expired.
Usually you should be ready to get started by visiting the hostname you have set up. If it does not work, log an issue. We'll help you out and fix the documentation for everyone else.