Skip to content

Instantly share code, notes, and snippets.

@josephspurrier
Last active May 18, 2016 18:07
Show Gist options
  • Save josephspurrier/f17fa96e6361b1c327c2907728d417b7 to your computer and use it in GitHub Desktop.
Save josephspurrier/f17fa96e6361b1c327c2907728d417b7 to your computer and use it in GitHub Desktop.
Set up AWS PHP Project on OS X with Composer
################################################################################
# Set up PHP Project on OS X with Composer
################################################################################
# Download Composer
curl -sS https://getcomposer.org/installer | php
# Move to a global location
mv composer.phar /usr/local/bin/composer
# Create the project folder
mkdir ~/Desktop/php-project
# Change to folder
cd ~/Desktop/php-project
# Require AWS SDK PHP or any other
composer require aws/aws-sdk-php
# Make public folder
mkdir public
# Run PHP web server
php -S localhost:8080 -t public
# Change to public folder
cd public
# Create index file
cat >index2.php <<EOL
<?php
require '../vendor/autoload.php';
EOL
# Open and you should see a blank webpage
open http://localhost:8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment