Skip to content
Marco Magnetti edited this page Jul 23, 2015 · 10 revisions

Graphene framework allows you to create Action Oriented REST services with less lines of code, like this:

class HelloWorld extends Action{
	public function run ()
	{
		$this->sendMessage('Hello world');
	}
}

##Creating Graphene project##

  1. Download Graphene as ZIP file and extract content into your project root.
  2. If you running apache server, change filename of htaccess.txt to .htaccess it will enable apache url rewriting module.
  3. Edit configuration file.
  4. Check if you are ready to go on yourProject.address/_system/status on your browser.
  5. Enjoy creating your first module!

##First Configuration## Edit settings.json file in your include root

{
  "debug"        : false,
  "frameworkDir" : "",
  "modulesUrl"   : "modules",
  "appName"      : "your_app_name",
  "localhost"    : "yourapp.com",
  "storageConfig" : {
    "driver"    : "CrudMySql",
    "type"      : "mysql",
    "dbName"    : "yourapp_db",
    "prefix"    : "tables_prefix",
    "username"  : "root",
    "password"  : "mysql"
  },

  "log" : {
    "all"      : "logs/graphene.log",
    "requests" : "logs/requests.log",
    "errors"   : "logs/errors.log",
    "debug"    : "logs/debug.log"
  }
}

StorageDriver is a name of database driver. Is now supported only mySql for native storage

##Ready to go## Before starting your project, check yourapp.com/system/status. If you have message like this:

{
    "GrapheneStatus": {
        "framework-infos": "Graphene 0.1b developed by Marco Magnetti <marcomagnetti@gmail.com>",
        "framework-version": "0.1b",
        "app-name": "your_app_name",
        "installed-modules": 8,
        "db": {
            "connectionStatus": "ok",
            "driver": "mySql CRUD-JSON driver v.1b, for Graphene 0.1b"
        },
        "server": {
            "time": "2014-09-26 00:21:44"
        }
    }
}

you are ready to start your project with graphene ;)

Tutorials

Clone this wiki locally