From 320285ae401ffd7da9c24e041dc49275d7a69364 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Fri, 9 Oct 2020 17:18:57 -0400 Subject: [PATCH 1/4] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e446e68..b90b2f1 100644 --- a/README.md +++ b/README.md @@ -17,14 +17,14 @@ - go to where you want your app to be and run `laravel new blog` substituting the name of your app for `blog` - `cd` into your app's dir - run `php artisan serve` -- go to http://localhost:8000/ -- if browser asks you to generate key, click the button ## After Forking/Cloning - `cd` to repo dir - run `composer install` - run `cp .env.example .env` +- go to http://localhost:8000/index.html +- if browser asks you to generate key, click the button ## Connect to db From 6b0b75422c573f8dc90ee5783695c8e7fb2c6852 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Fri, 9 Oct 2020 19:33:52 -0400 Subject: [PATCH 2/4] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b90b2f1..7645e5f 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,13 @@ - `mv ~/Downloads/composer-stable.phar /usr/local/bin/composer` - `chmod 755 /usr/local/bin/composer` - - `composer global require laravel/installer` - `echo 'export PATH="$HOME/.composer/vendor/bin:$PATH"' >> ~/.bash_profile` - `ls /Applications/MAMP/bin/php` and take note of the most recent version - - run `echo 'export PATH="/Applications/MAMP/bin/php/php7.4.2/bin:$PATH"' >> ~/.bash_profile` substituting your latest version of php for `php7.4.2` + - `echo 'export PATH="/Applications/MAMP/bin/php/php7.4.2/bin:$PATH"' >> ~/.bash_profile` substituting your latest version of php for `php7.4.2` - close terminal window and open a new one +- run `composer global require laravel/installer` + - go to where you want your app to be and run `laravel new blog` substituting the name of your app for `blog` - `cd` into your app's dir - run `php artisan serve` From 1f3b90692953bc956a0f005577633e05207ce386 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Fri, 9 Oct 2020 19:41:10 -0400 Subject: [PATCH 3/4] Update README.md --- README.md | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 7645e5f..e0919e7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Steps to Create and Deploy -## Initialize +## Initialize Composer - Make sure you have MAMP and Postgres installed and running - Download comopser: https://getcomposer.org/composer-stable.phar @@ -13,19 +13,14 @@ - `echo 'export PATH="/Applications/MAMP/bin/php/php7.4.2/bin:$PATH"' >> ~/.bash_profile` substituting your latest version of php for `php7.4.2` - close terminal window and open a new one -- run `composer global require laravel/installer` -- go to where you want your app to be and run `laravel new blog` substituting the name of your app for `blog` -- `cd` into your app's dir -- run `php artisan serve` +## Forking/Cloning This Repo -## After Forking/Cloning +After forking and cloning this repo to your local machine: - `cd` to repo dir - run `composer install` - run `cp .env.example .env` -- go to http://localhost:8000/index.html -- if browser asks you to generate key, click the button ## Connect to db @@ -38,7 +33,9 @@ CREATE TABLE people (id SERIAL, name VARCHAR(16), age INT); INSERT INTO people (name, age) VALUES ('matt', 40); ``` -In `.env` file, adjust the following: +Run `whoami` and take note over your computer's username (mine is `matthuntington`) + +In `.env` file, adjust the following code block: ``` DB_CONNECTION=mysql @@ -60,13 +57,11 @@ DB_USERNAME=matthuntington DB_PASSWORD= ``` -## Create routes +Instead of `matthuntington` insert your computer's username (what you found when running `whoami`) -In `routes/api.php` add: +## Start App -```php -Route::get('people', function () { - $users = DB::select('SELECT * FROM people'); - return $users; -}); -``` +- run `php artisan serve` +- go to http://localhost:8000/ +- if browser asks you to generate key, click the button +- go to http://localhost:8000/index.html From 0db2e64b9ad1b7e2cced1337c293ab60e3c7a56d Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Fri, 9 Oct 2020 19:49:27 -0400 Subject: [PATCH 4/4] Update README.md --- README.md | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e0919e7..58a8546 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Steps to Create and Deploy -## Initialize Composer +## Set up local app + +### Install Composer - Make sure you have MAMP and Postgres installed and running - Download comopser: https://getcomposer.org/composer-stable.phar @@ -14,7 +16,7 @@ - close terminal window and open a new one -## Forking/Cloning This Repo +### Forking/Cloning This Repo After forking and cloning this repo to your local machine: @@ -22,7 +24,7 @@ After forking and cloning this repo to your local machine: - run `composer install` - run `cp .env.example .env` -## Connect to db +### Connect to db Connect to psql and @@ -59,9 +61,24 @@ DB_PASSWORD= Instead of `matthuntington` insert your computer's username (what you found when running `whoami`) -## Start App +### Start App - run `php artisan serve` - go to http://localhost:8000/ - if browser asks you to generate key, click the button - go to http://localhost:8000/index.html + +## set up heroku + +### in your terminal + +1. run `heroku create` (take note of the app name for later) + +### in your browser + +1. go to heroku.com in your browser and sign in +1. find this newly created heroku app in your list of available apps and click on it +1. go to resources +1. search for postgres and choose Heroku Postgres +1. choose "Hobby Dev - Free" +1. click provision