-
Notifications
You must be signed in to change notification settings - Fork 0
Tips
-
To clone the project quickly you can add the following line to your .bash_profile file:
sudo nano ~/.bash_profile
And add:
alias codengine="git clone https://github.com/danielgolub/Codengine.git";
Now you can just use the command 'codengine' to clone the latest version. You can also use
codengine folderName
to clone inside a different folder than 'codengine'. -
To use MongoDB with Codengine, disable the database class in your app/config.php (line 15 - enabled => false) and add the following lines to your /app/start.php file below line 42 (which starts with $API = new..):
$mongo = new MongoClient("mongodb://someuser:password@123.123.123.123:29715/admin"); $DB = $mongo->selectDB("admin");
Now you can just fire up the mongo functions in every controller through
$this->db
(for example - $this->db->users->find()) -
When using the Database base class, in order to encode characters with utf8, please add the following line after line 53 in /index.php:
$registry->get("db")->set_encoding('utf8');