Nette Framework + = :heart:

Nette Framework is one of the best PHP Web frameworks for me. It is Open-Source and combines lot of super pieces like Latte for templates, Tracy for debugging and lot of awesome classes from core framework.

Getting started

Create a Cloud9 workspace of the type „PHP“

Create a Nette Project

Open your Terminal and execute the following to create a new Nette-Project

rm php.ini hello-world.php
composer create-project nette/web-project
mv web-project/* ./
rm -rf web-project

Running the project

As web-project is serving its content from the „www“ directory we need to modify the apache config using nano (a text editor):

sudo nano /etc/apache2/sites-enabled/001-cloud9.conf

Then do the following:

// Change this line
DocumentRoot /home/ubuntu/workspace

// To following
DocumentRoot /home/ubuntu/workspace/www

To save the file press F2, then Y and Enter.

Then we restart apache

sudo apache2ctl restart

And open „Preview“

Profit :-)

(rewrited from originals: and

PS: Because use some proxy system, running debug mode on my IP address doesn't work with classic way, but this simple hack works:

in bootstrap.php

// Change this line

// To following
$configurator->setDebugMode($_SERVER['HTTP_X_FORWARDED_FOR'] === '23.75.345.200');

nette sandbox cloud9