more readme

pull/1/head
Matt Huntington 5 years ago
parent fd200cc35b
commit 728c78b060

@ -1,13 +1,53 @@
# Steps to Create and Deploy: # Steps to Create and Deploy:
## set up local
### in your browser
1. fork this repo 1. fork this repo
1. clone your fork of this repo onto your local computer
### in your terminal
1. clone your fork of this repo onto your local computer somewhere outside the class repo
1. `cd` into the local repo 1. `cd` into the local repo
1. open your postgres app and start the db server
1. back in the, run `nodemon`
#### if you deleted your old "contacts" database from class
1. in the postgres app, double click one of the existing databases to enter `psql`
1. once inside `psql`, run:
1. `CREATE DATABASE contacts;`
1. `\c contacts`
1. `CREATE TABLE people (id SERIAL, name VARCHAR(16), age INT);`
1. `INSERT INTO people ( name, age ) VALUES ( 'Matt', 38 );`
1. `INSERT INTO people ( name, age ) VALUES ( 'Sally', 54 );`
1. `INSERT INTO people ( name, age ) VALUES ( 'Zanthar', 4892 );`
## set up heroku
### in your terminal
1. run `heroku create` 1. run `heroku create`
1. run `git push heroku master` 1. run `git push heroku master`
### in your browser
1. go to heroku.com in your browser and sign in 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. find this newly created heroku app in your list of available apps and click on it
1. go to resources 1. go to resources
1. search for postgres and choose Heroku Postgres 1. search for postgres and choose Heroku Postgres
1. choose "Hobby Dev - Free" 1. choose "Hobby Dev - Free"
1. click provision 1. click provision
### in your terminal
1. in your terminal, if running `psql` gives you "command not found", run `ln -s /Applications/Postgres.app/Contents/Versions/latest/bin/psql /usr/local/bin/psql`
1. run `heroku pg:psql`
1. once inside heroku's psql, run
1. `CREATE TABLE people (id SERIAL, name VARCHAR(16), age INT);`
1. `INSERT INTO people ( name, age ) VALUES ( 'Matt', 38 );`
1. `INSERT INTO people ( name, age ) VALUES ( 'Sally', 54 );`
1. `INSERT INTO people ( name, age ) VALUES ( 'Zanthar', 4892 );`
1. exit heroku psql with `\q`
1. run `heroku open` to see app

Loading…
Cancel
Save