The first thing to do is to install MAMP. This will be your local webhosting server. You technically already have much of the software installed on your apple computer, but MAMP puts it all in one place in a simple GUI. Just clicking start will setup everything and allow you to stop it easily. Similarly any mac OS updates that might break your server, but with Mamp they will obviously focused on making sure their one product doesn't break. Go to: http://www.mamp.info/en/index.html, Download and Install.
Now, you should have a folder: "/Applications/MAMP/htdocs" This folder will be where all your web files are contained.
- Open Terminal
- Run the following in the Terminal:
- cd /Applications/MAMP/htdocs
- curl -s https://getcomposer.org/installer | php -d detect_unicode=Off
- php composer.phar create-project phpixie/project tutorial 2.*-dev --prefer-dist
- To Update any code in the future:
- cd /Applications/MAMP/htdocs/tutorial
- php ../composer.phar update -o
- Finally you need to setup Mamp.
- Run MAMP (the icon should be in your tray, or look in Applications/MAMP)
- Click "Preferences..."
- Click "Apache"
- Set Document Root to "/Applications/MAMP/htdocs/tutorial/web"
- Now test it at: http://localhost:8888
The key in step 4 is to always set the document root to your "web" folder. There is the index.php file that calls the whole PHPixie.
You might be tempted to take the files out of the folder "tutorial" and redirect the document root to "/Applications/MAMP/htdocs/web". But with the folder you can have multiple websites and switch them by switching the DocumentRoot setting. It is up to you. You can also download the package from Github and not use composer, but composer will be useful to add modules and update them. Please go the composer route, I didn't at first, but now I have and it is much more enjoyable!
Have Fun with PHPixie it is great!