From c04beb36d0c31022630a30819362d7093b2e51eb Mon Sep 17 00:00:00 2001 From: Kristyn Bryan Date: Thu, 9 Jun 2016 15:03:17 -0400 Subject: [PATCH 1/9] Create README.md --- unit_02/w05d01/homework/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 unit_02/w05d01/homework/README.md diff --git a/unit_02/w05d01/homework/README.md b/unit_02/w05d01/homework/README.md new file mode 100644 index 0000000..5aef1f6 --- /dev/null +++ b/unit_02/w05d01/homework/README.md @@ -0,0 +1,14 @@ +####1 What are the key differences between a server and a client? + + +####2 What is an HTTP request? + + +####3 What is the request-response cycle? + + +####4 Research what a 'node package' is and explain it. + + +####5 Research the node package 'Express' and explain why we might want to use it. + From f3bd12312ce6e38a2191f99e1262a79b0d04e61c Mon Sep 17 00:00:00 2001 From: Kristyn Bryan Date: Thu, 9 Jun 2016 15:04:06 -0400 Subject: [PATCH 2/9] Update README.md --- unit_02/w05d01/homework/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/unit_02/w05d01/homework/README.md b/unit_02/w05d01/homework/README.md index 5aef1f6..5b90747 100644 --- a/unit_02/w05d01/homework/README.md +++ b/unit_02/w05d01/homework/README.md @@ -12,3 +12,9 @@ ####5 Research the node package 'Express' and explain why we might want to use it. +Video about NPM +https://www.youtube.com/watch?v=gvGjaqZducI&index=2&list=PLw1xVKFbouel1pRYoEMgNO53YTMN3TSYP + +GIST: +https://gist.github.com/kristynrb/d89afd26c4c4421313bd + From 77520152d6aca06f758c365600af5353e42d4c7f Mon Sep 17 00:00:00 2001 From: Kristyn Bryan Date: Thu, 9 Jun 2016 15:05:39 -0400 Subject: [PATCH 3/9] Create README.md --- unit_02/w05d02/homework/README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 unit_02/w05d02/homework/README.md diff --git a/unit_02/w05d02/homework/README.md b/unit_02/w05d02/homework/README.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/unit_02/w05d02/homework/README.md @@ -0,0 +1 @@ + From cc4a5d5dee2dbd699dfc91cb68ba5889dedf9c45 Mon Sep 17 00:00:00 2001 From: Kristyn Bryan Date: Thu, 9 Jun 2016 15:18:01 -0400 Subject: [PATCH 4/9] Update README.md --- unit_02/w05d02/homework/README.md | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/unit_02/w05d02/homework/README.md b/unit_02/w05d02/homework/README.md index 8b13789..ba3ebe1 100644 --- a/unit_02/w05d02/homework/README.md +++ b/unit_02/w05d02/homework/README.md @@ -1 +1,39 @@ +Skywalker +Thom Page & Kristyn Bryan + +#EXPRESS YOURSELF!! + + +## Learning Objectives +* Practice setting up express applications. +* Practice creating custom routes. +* Practice using parameters from a request. + + + +####Tonight you will be using your new found skills to create three separate Express apps. +__________________________________________________________ +__________________________________________________________ + +
+#Tip Calculator APP +- Create an express application. +- Your app should have a route of `'/tip'` and it should expect 2 params. One of which should be `total` and one should be `tipPercentage`. +- When hitting the route the page should display how much you tip will be based on the total ammount of the bill and the tip percentage. (ex. hitting `'/tip/100/20'` should display `20` on the page). + + +
+#Magic 8 Ball APP +- Create an express application. +- Create a route of `'/magic'` that should expect one parameter which is a question to ask the 8ball. +- The params of the route should be a question. (ex. `'/magic/Will%20I%20Be%20A%20Millionaire'`) +- Remember that we can't use spaces in the url, so we use `%20` to express a space in the url. +- So if the user hits that route and asks a question of "Will I be a Millionaire" he should get his question asked and a random 8ball quote on the screen. +- Use this array of 8ball quotes..... + +``` +["It is certain", "It is decidedly so", "Without a doubt", "Yes definitely","You may rely on it", "As I see it yes", "Most likely", "Outlook good","Yes", "Signs point to yes", "Reply hazy try again", "Ask again later","Better not tell you now", "Cannot predict now", "Concentrate and ask again","Don't count on it", "My reply is no", "My sources say no","Outlook not so good", "Very doubtful"] + +
+## Views From cee4f6ac65537b26a0b3126fac5b887b271cad93 Mon Sep 17 00:00:00 2001 From: Kristyn Bryan Date: Thu, 9 Jun 2016 15:22:29 -0400 Subject: [PATCH 5/9] Update README.md --- unit_02/w05d02/homework/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/unit_02/w05d02/homework/README.md b/unit_02/w05d02/homework/README.md index ba3ebe1..ed79b80 100644 --- a/unit_02/w05d02/homework/README.md +++ b/unit_02/w05d02/homework/README.md @@ -33,7 +33,11 @@ __________________________________________________________ ``` ["It is certain", "It is decidedly so", "Without a doubt", "Yes definitely","You may rely on it", "As I see it yes", "Most likely", "Outlook good","Yes", "Signs point to yes", "Reply hazy try again", "Ask again later","Better not tell you now", "Cannot predict now", "Concentrate and ask again","Don't count on it", "My reply is no", "My sources say no","Outlook not so good", "Very doubtful"] - +```
## Views +Index +Show +Module.export + From e5e11eee57d3e2b4bef3cd24ddf8934fb6fdfe62 Mon Sep 17 00:00:00 2001 From: Kristyn Bryan Date: Thu, 9 Jun 2016 15:41:21 -0400 Subject: [PATCH 6/9] Update README.md --- unit_02/w05d02/homework/README.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/unit_02/w05d02/homework/README.md b/unit_02/w05d02/homework/README.md index ed79b80..55e1724 100644 --- a/unit_02/w05d02/homework/README.md +++ b/unit_02/w05d02/homework/README.md @@ -1,5 +1,19 @@ -Skywalker -Thom Page & Kristyn Bryan +![ga](http://mobbook.generalassemb.ly/ga_cog.png) + +# WDI-PANTHALASSA + +--- +Title: Homework w05d02
+Type: Homework
+Duration: "4:00"
+Creator:
+ Original creators: WDI-Skywalker
+ Adapted by: Thom Page & Kristyn Bryan
+ Course: WDIr Panthalassa
+Competencies: Express, Routes, Views, Node
+Prerequisites: Express, Routes, Views, Node
+ +--- #EXPRESS YOURSELF!! From 899c02b7b47f39a8c9be9e81561a77ff261969c8 Mon Sep 17 00:00:00 2001 From: Kristyn Bryan Date: Thu, 9 Jun 2016 15:41:44 -0400 Subject: [PATCH 7/9] Update README.md --- unit_02/w05d02/homework/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unit_02/w05d02/homework/README.md b/unit_02/w05d02/homework/README.md index 55e1724..dec81e6 100644 --- a/unit_02/w05d02/homework/README.md +++ b/unit_02/w05d02/homework/README.md @@ -10,8 +10,8 @@ Creator:
Original creators: WDI-Skywalker
Adapted by: Thom Page & Kristyn Bryan
Course: WDIr Panthalassa
-Competencies: Express, Routes, Views, Node
-Prerequisites: Express, Routes, Views, Node
+Competencies: Javascript, Express, Routes, Views, Node
+Prerequisites: Javascript
--- From 0626aa654106767e097182fed9c537b00bfd0aea Mon Sep 17 00:00:00 2001 From: Kristyn Bryan Date: Thu, 9 Jun 2016 16:08:02 -0400 Subject: [PATCH 8/9] Update README.md --- unit_02/w05d02/homework/README.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/unit_02/w05d02/homework/README.md b/unit_02/w05d02/homework/README.md index dec81e6..b89115f 100644 --- a/unit_02/w05d02/homework/README.md +++ b/unit_02/w05d02/homework/README.md @@ -23,18 +23,18 @@ Prerequisites: Javascript
* Practice creating custom routes. * Practice using parameters from a request. - - ####Tonight you will be using your new found skills to create three separate Express apps. -__________________________________________________________ -__________________________________________________________
#Tip Calculator APP -- Create an express application. -- Your app should have a route of `'/tip'` and it should expect 2 params. One of which should be `total` and one should be `tipPercentage`. -- When hitting the route the page should display how much you tip will be based on the total ammount of the bill and the tip percentage. (ex. hitting `'/tip/100/20'` should display `20` on the page). +- Create an express application (see the bottom of this homework for a reminder). +- Your app should have a route of `'/tip'` and it should expect *2 params*. One should be `total` and one should be `tipPercentage`. +- When hitting the route, the page should *display how much your tip will be* based on the total ammount of the bill and the tip percentage. (ex. hitting `'/tip/100/20'` should display `20` on the page). +**Commit 1**
+
+"Commit 1: Tip Calculator express application created." +

#Magic 8 Ball APP @@ -48,6 +48,12 @@ __________________________________________________________ ``` ["It is certain", "It is decidedly so", "Without a doubt", "Yes definitely","You may rely on it", "As I see it yes", "Most likely", "Outlook good","Yes", "Signs point to yes", "Reply hazy try again", "Ask again later","Better not tell you now", "Cannot predict now", "Concentrate and ask again","Don't count on it", "My reply is no", "My sources say no","Outlook not so good", "Very doubtful"] ``` + +**Commit 2**
+
+"Commit 2: Magic 8 Ball express application created." +
+
## Views Index From d5eebe381020ec55cb60ba99619fc83a24ee8c91 Mon Sep 17 00:00:00 2001 From: Kristyn Bryan Date: Thu, 9 Jun 2016 16:23:47 -0400 Subject: [PATCH 9/9] Update README.md --- unit_02/w05d02/homework/README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/unit_02/w05d02/homework/README.md b/unit_02/w05d02/homework/README.md index b89115f..3a25400 100644 --- a/unit_02/w05d02/homework/README.md +++ b/unit_02/w05d02/homework/README.md @@ -39,11 +39,11 @@ Prerequisites: Javascript

#Magic 8 Ball APP - Create an express application. -- Create a route of `'/magic'` that should expect one parameter which is a question to ask the 8ball. -- The params of the route should be a question. (ex. `'/magic/Will%20I%20Be%20A%20Millionaire'`) +- Create a route of `'/magic'` that should expect a phrase in the URL that ask the Magic 8 ball a question. +- So if the user hits that route and asks a question of "Will I be a Millionaire" (ex. `'/magic/Will%20I%20Be%20A%20Millionaire'`) he should have return to him his question AND a random Magic 8 ball response (see the array below) on the screen. - Remember that we can't use spaces in the url, so we use `%20` to express a space in the url. -- So if the user hits that route and asks a question of "Will I be a Millionaire" he should get his question asked and a random 8ball quote on the screen. -- Use this array of 8ball quotes..... +- So if the user hits that route and asks a question of "Will I be a Millionaire" he should get his question asked and a random Magic 8 ball quote on the screen. +- Use this array of Magic 8 ball responses..... ``` ["It is certain", "It is decidedly so", "Without a doubt", "Yes definitely","You may rely on it", "As I see it yes", "Most likely", "Outlook good","Yes", "Signs point to yes", "Reply hazy try again", "Ask again later","Better not tell you now", "Cannot predict now", "Concentrate and ask again","Don't count on it", "My reply is no", "My sources say no","Outlook not so good", "Very doubtful"] @@ -54,6 +54,8 @@ Prerequisites: Javascript
"Commit 2: Magic 8 Ball express application created."
+# Example express application +
## Views Index