diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/ashwin_vidiyala/JS_Fundamentals/javascript_basics_one.html b/ashwin_vidiyala/JS_Fundamentals/javascript_basics_one.html old mode 100644 new mode 100755 diff --git a/ashwin_vidiyala/JS_Fundamentals/javascript_basics_two.html b/ashwin_vidiyala/JS_Fundamentals/javascript_basics_two.html old mode 100644 new mode 100755 diff --git a/ashwin_vidiyala/JS_Fundamentals/javascript_dom_one.html b/ashwin_vidiyala/JS_Fundamentals/javascript_dom_one.html old mode 100644 new mode 100755 diff --git a/ashwin_vidiyala/JS_Fundamentals/javascript_dom_two.html b/ashwin_vidiyala/JS_Fundamentals/javascript_dom_two.html old mode 100644 new mode 100755 diff --git a/ashwin_vidiyala/JS_Fundamentals/javascript_hoisting.md b/ashwin_vidiyala/JS_Fundamentals/javascript_hoisting.md old mode 100644 new mode 100755 diff --git a/ashwin_vidiyala/JS_Fundamentals/javascript_intermediate.html b/ashwin_vidiyala/JS_Fundamentals/javascript_intermediate.html old mode 100644 new mode 100755 diff --git a/ashwin_vidiyala/JS_Fundamentals/javascript_math.html b/ashwin_vidiyala/JS_Fundamentals/javascript_math.html old mode 100644 new mode 100755 diff --git a/ashwin_vidiyala/JS_Fundamentals/javascript_objects.html b/ashwin_vidiyala/JS_Fundamentals/javascript_objects.html old mode 100644 new mode 100755 diff --git a/ashwin_vidiyala/JS_Fundamentals/javascript_scroll.html b/ashwin_vidiyala/JS_Fundamentals/javascript_scroll.html old mode 100644 new mode 100755 diff --git a/ashwin_vidiyala/JS_OOP/deck_of_cards.html b/ashwin_vidiyala/JS_OOP/deck_of_cards.html old mode 100644 new mode 100755 diff --git a/ashwin_vidiyala/JS_OOP/ninja_class.html b/ashwin_vidiyala/JS_OOP/ninja_class.html old mode 100644 new mode 100755 diff --git a/ashwin_vidiyala/JS_OOP/ninja_class_three.html b/ashwin_vidiyala/JS_OOP/ninja_class_three.html old mode 100644 new mode 100755 diff --git a/derek_love/JS_Advanced/GOT/baratheon.png b/derek_love/JS_Advanced/GOT/baratheon.png old mode 100644 new mode 100755 diff --git a/derek_love/JS_Advanced/GOT/details.js b/derek_love/JS_Advanced/GOT/details.js old mode 100644 new mode 100755 diff --git a/derek_love/JS_Advanced/GOT/houses.html b/derek_love/JS_Advanced/GOT/houses.html old mode 100644 new mode 100755 diff --git a/derek_love/JS_Advanced/GOT/lannister.jpg b/derek_love/JS_Advanced/GOT/lannister.jpg old mode 100644 new mode 100755 diff --git a/derek_love/JS_Advanced/GOT/stark.jpg b/derek_love/JS_Advanced/GOT/stark.jpg old mode 100644 new mode 100755 diff --git a/derek_love/JS_Advanced/GOT/styles.css b/derek_love/JS_Advanced/GOT/styles.css old mode 100644 new mode 100755 diff --git a/derek_love/JS_Advanced/GOT/targaryen.jpg b/derek_love/JS_Advanced/GOT/targaryen.jpg old mode 100644 new mode 100755 diff --git a/derek_love/JS_Advanced/JS_library.js b/derek_love/JS_Advanced/JS_library.js old mode 100644 new mode 100755 diff --git a/derek_love/JS_Advanced/WeatherApp/styles-weatherApp.css b/derek_love/JS_Advanced/WeatherApp/styles-weatherApp.css old mode 100644 new mode 100755 diff --git a/derek_love/JS_Advanced/WeatherApp/weatherApp.html b/derek_love/JS_Advanced/WeatherApp/weatherApp.html old mode 100644 new mode 100755 diff --git a/derek_love/JS_Advanced/WeatherApp/weatherAppScript.js b/derek_love/JS_Advanced/WeatherApp/weatherAppScript.js old mode 100644 new mode 100755 diff --git a/derek_love/JS_Advanced/dojoQuery/dojo.js b/derek_love/JS_Advanced/dojoQuery/dojo.js old mode 100644 new mode 100755 diff --git a/derek_love/JS_Advanced/dojoQuery/index.html b/derek_love/JS_Advanced/dojoQuery/index.html old mode 100644 new mode 100755 diff --git a/derek_love/JS_Advanced/fibNacci.js b/derek_love/JS_Advanced/fibNacci.js old mode 100644 new mode 100755 diff --git a/derek_love/JS_Advanced/hunt_github/hunt.js b/derek_love/JS_Advanced/hunt_github/hunt.js old mode 100644 new mode 100755 diff --git a/derek_love/JS_Advanced/hunt_github/index.html b/derek_love/JS_Advanced/hunt_github/index.html old mode 100644 new mode 100755 diff --git a/derek_love/JS_Advanced/test.js b/derek_love/JS_Advanced/test.js old mode 100644 new mode 100755 diff --git a/derek_love/JS_Fun/JS Math.html b/derek_love/JS_Fun/JS Math.html old mode 100644 new mode 100755 diff --git a/derek_love/JS_Fun/JSIntermediate.html b/derek_love/JS_Fun/JSIntermediate.html old mode 100644 new mode 100755 diff --git a/derek_love/JS_Fun/JS_Hoisting.txt b/derek_love/JS_Fun/JS_Hoisting.txt old mode 100644 new mode 100755 diff --git a/derek_love/JS_Fun/JS_Objects.html b/derek_love/JS_Fun/JS_Objects.html old mode 100644 new mode 100755 diff --git a/derek_love/JS_Fun/JS_Scroll.html b/derek_love/JS_Fun/JS_Scroll.html old mode 100644 new mode 100755 diff --git a/derek_love/JS_Fun/basicOne.html b/derek_love/JS_Fun/basicOne.html old mode 100644 new mode 100755 diff --git a/derek_love/JS_Fun/basicTwo.html b/derek_love/JS_Fun/basicTwo.html old mode 100644 new mode 100755 diff --git a/derek_love/JS_Fun/js_dom_1.html b/derek_love/JS_Fun/js_dom_1.html old mode 100644 new mode 100755 diff --git a/derek_love/JS_Fun/js_dom_2.html b/derek_love/JS_Fun/js_dom_2.html old mode 100644 new mode 100755 diff --git a/derek_love/JS_Fun/test.js b/derek_love/JS_Fun/test.js old mode 100644 new mode 100755 diff --git a/derek_love/JS_OOP/cardDeck.html b/derek_love/JS_OOP/cardDeck.html old mode 100644 new mode 100755 diff --git a/derek_love/JS_OOP/ninjaOne.html b/derek_love/JS_OOP/ninjaOne.html old mode 100644 new mode 100755 diff --git a/derek_love/JS_OOP/ninjaThree.html b/derek_love/JS_OOP/ninjaThree.html old mode 100644 new mode 100755 diff --git a/derek_love/JS_OOP/ninjaTwo.html b/derek_love/JS_OOP/ninjaTwo.html old mode 100644 new mode 100755 diff --git a/derek_love/node/carsCats/images/cat1.jpg b/derek_love/node/carsCats/images/cat1.jpg old mode 100644 new mode 100755 diff --git a/derek_love/node/carsCats/images/cat2.jpg b/derek_love/node/carsCats/images/cat2.jpg old mode 100644 new mode 100755 diff --git a/derek_love/node/carsCats/images/lambo.jpg b/derek_love/node/carsCats/images/lambo.jpg old mode 100644 new mode 100755 diff --git a/derek_love/node/carsCats/server.js b/derek_love/node/carsCats/server.js old mode 100644 new mode 100755 diff --git a/derek_love/node/carsCats/views/form.html b/derek_love/node/carsCats/views/form.html old mode 100644 new mode 100755 diff --git a/derek_love/node/carsCats/views/index.html b/derek_love/node/carsCats/views/index.html old mode 100644 new mode 100755 diff --git a/derek_love/node/carsCats/views/index2.html b/derek_love/node/carsCats/views/index2.html old mode 100644 new mode 100755 diff --git a/derek_love/node/landing/server.js b/derek_love/node/landing/server.js old mode 100644 new mode 100755 diff --git a/derek_love/node/landing/views/dojos.html b/derek_love/node/landing/views/dojos.html old mode 100644 new mode 100755 diff --git a/derek_love/node/landing/views/index.html b/derek_love/node/landing/views/index.html old mode 100644 new mode 100755 diff --git a/derek_love/node/landing/views/ninjas.html b/derek_love/node/landing/views/ninjas.html old mode 100644 new mode 100755 diff --git a/derek_love/node/math_mod/mathlib.js b/derek_love/node/math_mod/mathlib.js old mode 100644 new mode 100755 diff --git a/derek_love/node/math_mod/server.js b/derek_love/node/math_mod/server.js old mode 100644 new mode 100755 diff --git a/derek_love/node/node_server/app.js b/derek_love/node/node_server/app.js old mode 100644 new mode 100755 diff --git a/derek_love/node/node_server/dojo.html b/derek_love/node/node_server/dojo.html old mode 100644 new mode 100755 diff --git a/derek_love/node/node_server/index.html b/derek_love/node/node_server/index.html old mode 100644 new mode 100755 diff --git a/derek_love/node/node_server/stylesheets/styles.css b/derek_love/node/node_server/stylesheets/styles.css old mode 100644 new mode 100755 diff --git a/derek_love/node/test.js b/derek_love/node/test.js old mode 100644 new mode 100755 diff --git a/dillon_votaw/express/counter/package.json b/dillon_votaw/express/counter/package.json old mode 100644 new mode 100755 diff --git a/dillon_votaw/express/counter/server.js b/dillon_votaw/express/counter/server.js old mode 100644 new mode 100755 diff --git a/dillon_votaw/express/counter/static/main.css b/dillon_votaw/express/counter/static/main.css old mode 100644 new mode 100755 diff --git a/dillon_votaw/express/counter/views/index.ejs b/dillon_votaw/express/counter/views/index.ejs old mode 100644 new mode 100755 diff --git a/dillon_votaw/express/hello_express/package.json b/dillon_votaw/express/hello_express/package.json old mode 100644 new mode 100755 diff --git a/dillon_votaw/express/hello_express/server.js b/dillon_votaw/express/hello_express/server.js old mode 100644 new mode 100755 diff --git a/dillon_votaw/express/hello_express/static/main.css b/dillon_votaw/express/hello_express/static/main.css old mode 100644 new mode 100755 diff --git a/dillon_votaw/express/hello_express/static/main.html b/dillon_votaw/express/hello_express/static/main.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/express/hello_express/views/index.ejs b/dillon_votaw/express/hello_express/views/index.ejs old mode 100644 new mode 100755 diff --git a/dillon_votaw/express/hello_express/views/users.ejs b/dillon_votaw/express/hello_express/views/users.ejs old mode 100644 new mode 100755 diff --git a/dillon_votaw/express/number_game/package.json b/dillon_votaw/express/number_game/package.json old mode 100644 new mode 100755 diff --git a/dillon_votaw/express/number_game/server.js b/dillon_votaw/express/number_game/server.js old mode 100644 new mode 100755 diff --git a/dillon_votaw/express/number_game/static/main.css b/dillon_votaw/express/number_game/static/main.css old mode 100644 new mode 100755 diff --git a/dillon_votaw/express/number_game/views/index.ejs b/dillon_votaw/express/number_game/views/index.ejs old mode 100644 new mode 100755 diff --git a/dillon_votaw/express/survey_form/package.json b/dillon_votaw/express/survey_form/package.json old mode 100644 new mode 100755 diff --git a/dillon_votaw/express/survey_form/server.js b/dillon_votaw/express/survey_form/server.js old mode 100644 new mode 100755 diff --git a/dillon_votaw/express/survey_form/static/main.css b/dillon_votaw/express/survey_form/static/main.css old mode 100644 new mode 100755 diff --git a/dillon_votaw/express/survey_form/views/index.ejs b/dillon_votaw/express/survey_form/views/index.ejs old mode 100644 new mode 100755 diff --git a/dillon_votaw/express/survey_form/views/result.ejs b/dillon_votaw/express/survey_form/views/result.ejs old mode 100644 new mode 100755 diff --git a/dillon_votaw/express/templates/index.ejs b/dillon_votaw/express/templates/index.ejs old mode 100644 new mode 100755 diff --git a/dillon_votaw/express/templates/main.css b/dillon_votaw/express/templates/main.css old mode 100644 new mode 100755 diff --git a/dillon_votaw/express/templates/package.json b/dillon_votaw/express/templates/package.json old mode 100644 new mode 100755 diff --git a/dillon_votaw/express/templates/server.js b/dillon_votaw/express/templates/server.js old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/broken_deck_of_cards.html b/dillon_votaw/javascript/broken_deck_of_cards.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/deck_of_cards.html b/dillon_votaw/javascript/deck_of_cards.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/dojoquery.html b/dillon_votaw/javascript/dojoquery.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/fib_nacci.html b/dillon_votaw/javascript/fib_nacci.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/for_running_js.html b/dillon_votaw/javascript/for_running_js.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/fundamentals/js_basics_i.html b/dillon_votaw/javascript/fundamentals/js_basics_i.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/fundamentals/js_basics_ii.html b/dillon_votaw/javascript/fundamentals/js_basics_ii.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/fundamentals/js_dom_i.html b/dillon_votaw/javascript/fundamentals/js_dom_i.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/fundamentals/js_dom_ii.html b/dillon_votaw/javascript/fundamentals/js_dom_ii.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/fundamentals/js_hoisting.html b/dillon_votaw/javascript/fundamentals/js_hoisting.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/fundamentals/js_intermediate.html b/dillon_votaw/javascript/fundamentals/js_intermediate.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/fundamentals/js_math.html b/dillon_votaw/javascript/fundamentals/js_math.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/fundamentals/js_objects.html b/dillon_votaw/javascript/fundamentals/js_objects.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/fundamentals/js_scroll.html b/dillon_votaw/javascript/fundamentals/js_scroll.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/game_of_thrones/game_of_thrones.html b/dillon_votaw/javascript/game_of_thrones/game_of_thrones.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/game_of_thrones/img/baratheon.png b/dillon_votaw/javascript/game_of_thrones/img/baratheon.png old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/game_of_thrones/img/lannister.jpg b/dillon_votaw/javascript/game_of_thrones/img/lannister.jpg old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/game_of_thrones/img/stark.jpg b/dillon_votaw/javascript/game_of_thrones/img/stark.jpg old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/game_of_thrones/img/targaryen.jpg b/dillon_votaw/javascript/game_of_thrones/img/targaryen.jpg old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/game_of_thrones/jquery.js b/dillon_votaw/javascript/game_of_thrones/jquery.js old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/hunting_github/hunting_github.html b/dillon_votaw/javascript/hunting_github/hunting_github.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/hunting_github/jquery.js b/dillon_votaw/javascript/hunting_github/jquery.js old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/javascript_library.html b/dillon_votaw/javascript/javascript_library.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/jquery_template.js b/dillon_votaw/javascript/jquery_template.js old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/ninja_class_1.html b/dillon_votaw/javascript/ninja_class_1.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/ninja_class_2.html b/dillon_votaw/javascript/ninja_class_2.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/javascript/ninja_class_3.html b/dillon_votaw/javascript/ninja_class_3.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/cars_and_cats/apps.js b/dillon_votaw/node/cars_and_cats/apps.js old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/cars_and_cats/images/car1.jpg b/dillon_votaw/node/cars_and_cats/images/car1.jpg old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/cars_and_cats/images/car2.jpg b/dillon_votaw/node/cars_and_cats/images/car2.jpg old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/cars_and_cats/images/car3.jpg b/dillon_votaw/node/cars_and_cats/images/car3.jpg old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/cars_and_cats/images/cat1.jpg b/dillon_votaw/node/cars_and_cats/images/cat1.jpg old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/cars_and_cats/images/cat2.jpg b/dillon_votaw/node/cars_and_cats/images/cat2.jpg old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/cars_and_cats/images/cat3.jpg b/dillon_votaw/node/cars_and_cats/images/cat3.jpg old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/cars_and_cats/stylesheets/main.css b/dillon_votaw/node/cars_and_cats/stylesheets/main.css old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/cars_and_cats/views/cars.html b/dillon_votaw/node/cars_and_cats/views/cars.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/cars_and_cats/views/cats.html b/dillon_votaw/node/cars_and_cats/views/cats.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/cars_and_cats/views/form.html b/dillon_votaw/node/cars_and_cats/views/form.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/landing_page/app.js b/dillon_votaw/node/landing_page/app.js old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/landing_page/templates/dojos.html b/dillon_votaw/node/landing_page/templates/dojos.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/landing_page/templates/error.html b/dillon_votaw/node/landing_page/templates/error.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/landing_page/templates/index.html b/dillon_votaw/node/landing_page/templates/index.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/landing_page/templates/ninjas.html b/dillon_votaw/node/landing_page/templates/ninjas.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/math_module/app.js b/dillon_votaw/node/math_module/app.js old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/math_module/mathlib.js b/dillon_votaw/node/math_module/mathlib.js old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/node_module_basics/app.js b/dillon_votaw/node/node_module_basics/app.js old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/node_module_basics/my_module.js b/dillon_votaw/node/node_module_basics/my_module.js old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/node_server/app.js b/dillon_votaw/node/node_server/app.js old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/node_server/dojo/dojo.html b/dillon_votaw/node/node_server/dojo/dojo.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/node_server/index.html b/dillon_votaw/node/node_server/index.html old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/node_server/static/js/javascript.js b/dillon_votaw/node/node_server/static/js/javascript.js old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/template/server.js b/dillon_votaw/node/template/server.js old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/template/stylesheets/main.css b/dillon_votaw/node/template/stylesheets/main.css old mode 100644 new mode 100755 diff --git a/dillon_votaw/node/test.js b/dillon_votaw/node/test.js old mode 100644 new mode 100755 diff --git a/dillon_votaw/null.txt b/dillon_votaw/null.txt old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/.angular-cli.json b/kyla_stearns/Angular/faveAuthors/authors/.angular-cli.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/.editorconfig b/kyla_stearns/Angular/faveAuthors/authors/.editorconfig old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/.gitignore b/kyla_stearns/Angular/faveAuthors/authors/.gitignore old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/README.md b/kyla_stearns/Angular/faveAuthors/authors/README.md old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/e2e/app.e2e-spec.ts b/kyla_stearns/Angular/faveAuthors/authors/e2e/app.e2e-spec.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/e2e/app.po.ts b/kyla_stearns/Angular/faveAuthors/authors/e2e/app.po.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/e2e/tsconfig.e2e.json b/kyla_stearns/Angular/faveAuthors/authors/e2e/tsconfig.e2e.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/karma.conf.js b/kyla_stearns/Angular/faveAuthors/authors/karma.conf.js old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/package.json b/kyla_stearns/Angular/faveAuthors/authors/package.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/protractor.conf.js b/kyla_stearns/Angular/faveAuthors/authors/protractor.conf.js old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/app/app-routing.module.ts b/kyla_stearns/Angular/faveAuthors/authors/src/app/app-routing.module.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/app/app.component.css b/kyla_stearns/Angular/faveAuthors/authors/src/app/app.component.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/app/app.component.html b/kyla_stearns/Angular/faveAuthors/authors/src/app/app.component.html old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/app/app.component.spec.ts b/kyla_stearns/Angular/faveAuthors/authors/src/app/app.component.spec.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/app/app.component.ts b/kyla_stearns/Angular/faveAuthors/authors/src/app/app.component.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/app/app.module.ts b/kyla_stearns/Angular/faveAuthors/authors/src/app/app.module.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/app/edit/edit.component.css b/kyla_stearns/Angular/faveAuthors/authors/src/app/edit/edit.component.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/app/edit/edit.component.html b/kyla_stearns/Angular/faveAuthors/authors/src/app/edit/edit.component.html old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/app/edit/edit.component.spec.ts b/kyla_stearns/Angular/faveAuthors/authors/src/app/edit/edit.component.spec.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/app/edit/edit.component.ts b/kyla_stearns/Angular/faveAuthors/authors/src/app/edit/edit.component.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/app/home/home.component.css b/kyla_stearns/Angular/faveAuthors/authors/src/app/home/home.component.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/app/home/home.component.html b/kyla_stearns/Angular/faveAuthors/authors/src/app/home/home.component.html old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/app/home/home.component.spec.ts b/kyla_stearns/Angular/faveAuthors/authors/src/app/home/home.component.spec.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/app/home/home.component.ts b/kyla_stearns/Angular/faveAuthors/authors/src/app/home/home.component.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/app/http.service.spec.ts b/kyla_stearns/Angular/faveAuthors/authors/src/app/http.service.spec.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/app/http.service.ts b/kyla_stearns/Angular/faveAuthors/authors/src/app/http.service.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/app/new/new.component.css b/kyla_stearns/Angular/faveAuthors/authors/src/app/new/new.component.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/app/new/new.component.html b/kyla_stearns/Angular/faveAuthors/authors/src/app/new/new.component.html old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/app/new/new.component.spec.ts b/kyla_stearns/Angular/faveAuthors/authors/src/app/new/new.component.spec.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/app/new/new.component.ts b/kyla_stearns/Angular/faveAuthors/authors/src/app/new/new.component.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/assets/.gitkeep b/kyla_stearns/Angular/faveAuthors/authors/src/assets/.gitkeep old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/environments/environment.prod.ts b/kyla_stearns/Angular/faveAuthors/authors/src/environments/environment.prod.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/environments/environment.ts b/kyla_stearns/Angular/faveAuthors/authors/src/environments/environment.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/favicon.ico b/kyla_stearns/Angular/faveAuthors/authors/src/favicon.ico old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/favicon.png b/kyla_stearns/Angular/faveAuthors/authors/src/favicon.png old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/index.html b/kyla_stearns/Angular/faveAuthors/authors/src/index.html old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/main.ts b/kyla_stearns/Angular/faveAuthors/authors/src/main.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/polyfills.ts b/kyla_stearns/Angular/faveAuthors/authors/src/polyfills.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/styles.css b/kyla_stearns/Angular/faveAuthors/authors/src/styles.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/test.ts b/kyla_stearns/Angular/faveAuthors/authors/src/test.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/tsconfig.app.json b/kyla_stearns/Angular/faveAuthors/authors/src/tsconfig.app.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/tsconfig.spec.json b/kyla_stearns/Angular/faveAuthors/authors/src/tsconfig.spec.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/src/typings.d.ts b/kyla_stearns/Angular/faveAuthors/authors/src/typings.d.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/tsconfig.json b/kyla_stearns/Angular/faveAuthors/authors/tsconfig.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/authors/tslint.json b/kyla_stearns/Angular/faveAuthors/authors/tslint.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/package.json b/kyla_stearns/Angular/faveAuthors/package.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/faveAuthors/server.js b/kyla_stearns/Angular/faveAuthors/server.js old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/.angular-cli.json b/kyla_stearns/Angular/pokemon/.angular-cli.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/.editorconfig b/kyla_stearns/Angular/pokemon/.editorconfig old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/.gitignore b/kyla_stearns/Angular/pokemon/.gitignore old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/README.md b/kyla_stearns/Angular/pokemon/README.md old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/e2e/app.e2e-spec.ts b/kyla_stearns/Angular/pokemon/e2e/app.e2e-spec.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/e2e/app.po.ts b/kyla_stearns/Angular/pokemon/e2e/app.po.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/e2e/tsconfig.e2e.json b/kyla_stearns/Angular/pokemon/e2e/tsconfig.e2e.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/karma.conf.js b/kyla_stearns/Angular/pokemon/karma.conf.js old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/package.json b/kyla_stearns/Angular/pokemon/package.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/protractor.conf.js b/kyla_stearns/Angular/pokemon/protractor.conf.js old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/src/app/app.component.css b/kyla_stearns/Angular/pokemon/src/app/app.component.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/src/app/app.component.html b/kyla_stearns/Angular/pokemon/src/app/app.component.html old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/src/app/app.component.spec.ts b/kyla_stearns/Angular/pokemon/src/app/app.component.spec.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/src/app/app.component.ts b/kyla_stearns/Angular/pokemon/src/app/app.component.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/src/app/app.module.ts b/kyla_stearns/Angular/pokemon/src/app/app.module.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/src/app/http.service.spec.ts b/kyla_stearns/Angular/pokemon/src/app/http.service.spec.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/src/app/http.service.ts b/kyla_stearns/Angular/pokemon/src/app/http.service.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/src/assets/.gitkeep b/kyla_stearns/Angular/pokemon/src/assets/.gitkeep old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/src/assets/donuts.jpg b/kyla_stearns/Angular/pokemon/src/assets/donuts.jpg old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/src/assets/nikesnorlax.jpg b/kyla_stearns/Angular/pokemon/src/assets/nikesnorlax.jpg old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/src/assets/snorlax.jpg b/kyla_stearns/Angular/pokemon/src/assets/snorlax.jpg old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/src/environments/environment.prod.ts b/kyla_stearns/Angular/pokemon/src/environments/environment.prod.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/src/environments/environment.ts b/kyla_stearns/Angular/pokemon/src/environments/environment.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/src/favicon.ico b/kyla_stearns/Angular/pokemon/src/favicon.ico old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/src/favicon.png b/kyla_stearns/Angular/pokemon/src/favicon.png old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/src/index.html b/kyla_stearns/Angular/pokemon/src/index.html old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/src/main.ts b/kyla_stearns/Angular/pokemon/src/main.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/src/polyfills.ts b/kyla_stearns/Angular/pokemon/src/polyfills.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/src/styles.css b/kyla_stearns/Angular/pokemon/src/styles.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/src/test.ts b/kyla_stearns/Angular/pokemon/src/test.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/src/tsconfig.app.json b/kyla_stearns/Angular/pokemon/src/tsconfig.app.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/src/tsconfig.spec.json b/kyla_stearns/Angular/pokemon/src/tsconfig.spec.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/src/typings.d.ts b/kyla_stearns/Angular/pokemon/src/typings.d.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/tsconfig.json b/kyla_stearns/Angular/pokemon/tsconfig.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/pokemon/tslint.json b/kyla_stearns/Angular/pokemon/tslint.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/productMgmt/package.json b/kyla_stearns/Angular/productMgmt/package.json new file mode 100755 index 0000000..6b40c8d --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/package.json @@ -0,0 +1,19 @@ +{ + "name": "productMgmt", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "body-parser": "^1.18.2", + "express": "^4.16.3", + "mongoose": "^5.0.11", + "mongoose-type-url": "^1.0.2", + "mongoose-unique-validator": "^2.0.0" + } +} diff --git a/kyla_stearns/Angular/productMgmt/products/.angular-cli.json b/kyla_stearns/Angular/productMgmt/products/.angular-cli.json new file mode 100755 index 0000000..5c2f813 --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/.angular-cli.json @@ -0,0 +1,60 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "project": { + "name": "products" + }, + "apps": [ + { + "root": "src", + "outDir": "dist", + "assets": [ + "assets", + "favicon.png" + ], + "index": "index.html", + "main": "main.ts", + "polyfills": "polyfills.ts", + "test": "test.ts", + "tsconfig": "tsconfig.app.json", + "testTsconfig": "tsconfig.spec.json", + "prefix": "app", + "styles": [ + "styles.css" + ], + "scripts": [], + "environmentSource": "environments/environment.ts", + "environments": { + "dev": "environments/environment.ts", + "prod": "environments/environment.prod.ts" + } + } + ], + "e2e": { + "protractor": { + "config": "./protractor.conf.js" + } + }, + "lint": [ + { + "project": "src/tsconfig.app.json", + "exclude": "**/node_modules/**" + }, + { + "project": "src/tsconfig.spec.json", + "exclude": "**/node_modules/**" + }, + { + "project": "e2e/tsconfig.e2e.json", + "exclude": "**/node_modules/**" + } + ], + "test": { + "karma": { + "config": "./karma.conf.js" + } + }, + "defaults": { + "styleExt": "css", + "component": {} + } +} diff --git a/kyla_stearns/Angular/productMgmt/products/.editorconfig b/kyla_stearns/Angular/productMgmt/products/.editorconfig new file mode 100755 index 0000000..6e87a00 --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/.editorconfig @@ -0,0 +1,13 @@ +# Editor configuration, see http://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/kyla_stearns/Angular/productMgmt/products/.gitignore b/kyla_stearns/Angular/productMgmt/products/.gitignore new file mode 100755 index 0000000..eabf65e --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/.gitignore @@ -0,0 +1,44 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# compiled output +/dist +/dist-server +/tmp +/out-tsc + +# dependencies +/node_modules + +# IDEs and editors +/.idea +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# IDE - VSCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +# misc +/.sass-cache +/connect.lock +/coverage +/libpeerconnection.log +npm-debug.log +yarn-error.log +testem.log +/typings + +# e2e +/e2e/*.js +/e2e/*.map + +# System Files +.DS_Store +Thumbs.db diff --git a/kyla_stearns/Angular/productMgmt/products/README.md b/kyla_stearns/Angular/productMgmt/products/README.md new file mode 100755 index 0000000..a6dc459 --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/README.md @@ -0,0 +1,27 @@ +# Products + +This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.7.3. + +## Development server + +Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. + +## Code scaffolding + +Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. + +## Build + +Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build. + +## Running unit tests + +Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Running end-to-end tests + +Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). + +## Further help + +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). diff --git a/kyla_stearns/Angular/productMgmt/products/e2e/app.e2e-spec.ts b/kyla_stearns/Angular/productMgmt/products/e2e/app.e2e-spec.ts new file mode 100755 index 0000000..b445aba --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/e2e/app.e2e-spec.ts @@ -0,0 +1,14 @@ +import { AppPage } from './app.po'; + +describe('products App', () => { + let page: AppPage; + + beforeEach(() => { + page = new AppPage(); + }); + + it('should display welcome message', () => { + page.navigateTo(); + expect(page.getParagraphText()).toEqual('Welcome to app!'); + }); +}); diff --git a/kyla_stearns/Angular/productMgmt/products/e2e/app.po.ts b/kyla_stearns/Angular/productMgmt/products/e2e/app.po.ts new file mode 100755 index 0000000..82ea75b --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/e2e/app.po.ts @@ -0,0 +1,11 @@ +import { browser, by, element } from 'protractor'; + +export class AppPage { + navigateTo() { + return browser.get('/'); + } + + getParagraphText() { + return element(by.css('app-root h1')).getText(); + } +} diff --git a/kyla_stearns/Angular/productMgmt/products/e2e/tsconfig.e2e.json b/kyla_stearns/Angular/productMgmt/products/e2e/tsconfig.e2e.json new file mode 100755 index 0000000..1d9e5ed --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/e2e/tsconfig.e2e.json @@ -0,0 +1,14 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/e2e", + "baseUrl": "./", + "module": "commonjs", + "target": "es5", + "types": [ + "jasmine", + "jasminewd2", + "node" + ] + } +} diff --git a/kyla_stearns/Angular/productMgmt/products/karma.conf.js b/kyla_stearns/Angular/productMgmt/products/karma.conf.js new file mode 100755 index 0000000..af139fa --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/karma.conf.js @@ -0,0 +1,33 @@ +// Karma configuration file, see link for more information +// https://karma-runner.github.io/1.0/config/configuration-file.html + +module.exports = function (config) { + config.set({ + basePath: '', + frameworks: ['jasmine', '@angular/cli'], + plugins: [ + require('karma-jasmine'), + require('karma-chrome-launcher'), + require('karma-jasmine-html-reporter'), + require('karma-coverage-istanbul-reporter'), + require('@angular/cli/plugins/karma') + ], + client:{ + clearContext: false // leave Jasmine Spec Runner output visible in browser + }, + coverageIstanbulReporter: { + reports: [ 'html', 'lcovonly' ], + fixWebpackSourcePaths: true + }, + angularCli: { + environment: 'dev' + }, + reporters: ['progress', 'kjhtml'], + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: ['Chrome'], + singleRun: false + }); +}; diff --git a/kyla_stearns/Angular/productMgmt/products/package.json b/kyla_stearns/Angular/productMgmt/products/package.json new file mode 100755 index 0000000..4e96b82 --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/package.json @@ -0,0 +1,48 @@ +{ + "name": "products", + "version": "0.0.0", + "license": "MIT", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build --prod", + "test": "ng test", + "lint": "ng lint", + "e2e": "ng e2e" + }, + "private": true, + "dependencies": { + "@angular/animations": "^5.2.0", + "@angular/common": "^5.2.0", + "@angular/compiler": "^5.2.0", + "@angular/core": "^5.2.0", + "@angular/forms": "^5.2.0", + "@angular/http": "^5.2.0", + "@angular/platform-browser": "^5.2.0", + "@angular/platform-browser-dynamic": "^5.2.0", + "@angular/router": "^5.2.0", + "core-js": "^2.4.1", + "rxjs": "^5.5.6", + "zone.js": "^0.8.19" + }, + "devDependencies": { + "@angular/cli": "~1.7.3", + "@angular/compiler-cli": "^5.2.0", + "@angular/language-service": "^5.2.0", + "@types/jasmine": "~2.8.3", + "@types/jasminewd2": "~2.0.2", + "@types/node": "~6.0.60", + "codelyzer": "^4.0.1", + "jasmine-core": "~2.8.0", + "jasmine-spec-reporter": "~4.2.1", + "karma": "~2.0.0", + "karma-chrome-launcher": "~2.2.0", + "karma-coverage-istanbul-reporter": "^1.2.1", + "karma-jasmine": "~1.1.0", + "karma-jasmine-html-reporter": "^0.2.2", + "protractor": "~5.1.2", + "ts-node": "~4.1.0", + "tslint": "~5.9.1", + "typescript": "~2.5.3" + } +} diff --git a/kyla_stearns/Angular/productMgmt/products/protractor.conf.js b/kyla_stearns/Angular/productMgmt/products/protractor.conf.js new file mode 100755 index 0000000..7ee3b5e --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/protractor.conf.js @@ -0,0 +1,28 @@ +// Protractor configuration file, see link for more information +// https://github.com/angular/protractor/blob/master/lib/config.ts + +const { SpecReporter } = require('jasmine-spec-reporter'); + +exports.config = { + allScriptsTimeout: 11000, + specs: [ + './e2e/**/*.e2e-spec.ts' + ], + capabilities: { + 'browserName': 'chrome' + }, + directConnect: true, + baseUrl: 'http://localhost:4200/', + framework: 'jasmine', + jasmineNodeOpts: { + showColors: true, + defaultTimeoutInterval: 30000, + print: function() {} + }, + onPrepare() { + require('ts-node').register({ + project: 'e2e/tsconfig.e2e.json' + }); + jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); + } +}; diff --git a/kyla_stearns/Angular/productMgmt/products/src/app/app-routing.module.ts b/kyla_stearns/Angular/productMgmt/products/src/app/app-routing.module.ts new file mode 100755 index 0000000..99f7df9 --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/app/app-routing.module.ts @@ -0,0 +1,20 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { HomeComponent } from './home/home.component'; +import { ProductListComponent } from './product-list/product-list.component'; +import { EditComponent } from './edit/edit.component'; +import { NewComponent } from './new/new.component'; + +const routes: Routes = [ + {path: '', pathMatch: 'full', component: HomeComponent }, + {path: 'products', component: ProductListComponent}, + {path: 'products/new', component: NewComponent}, + {path: 'products/edit/:id', component: EditComponent} +]; + +@NgModule({ + imports: [RouterModule.forRoot(routes)], + exports: [RouterModule] +}) +export class AppRoutingModule { } diff --git a/kyla_stearns/Angular/productMgmt/products/src/app/app.component.css b/kyla_stearns/Angular/productMgmt/products/src/app/app.component.css new file mode 100755 index 0000000..524b7d1 --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/app/app.component.css @@ -0,0 +1,34 @@ +*{ + margin: 0px; + padding: 0px; + font-family: Arial, sans-serif; +} + +body{ + width: 970px; + margin: auto; +} + +header{ + width: 100%; + padding: 10px; +} + +header button{ + width: 150px; + font-size: 14px; + padding: 5px; + text-align: center; + background-color: lightgrey; + vertical-align: top; + margin: 0px 15px 0px 15px; + border-radius: 5px; +} + +header h1{ + margin: 15px 0px 15px 0px; +} + +main{ + padding: 15px; +} \ No newline at end of file diff --git a/kyla_stearns/Angular/productMgmt/products/src/app/app.component.html b/kyla_stearns/Angular/productMgmt/products/src/app/app.component.html new file mode 100755 index 0000000..516841f --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/app/app.component.html @@ -0,0 +1,12 @@ +
+

All the Things Product Collection

+ + + +
+ +
+ + + +
diff --git a/kyla_stearns/Angular/productMgmt/products/src/app/app.component.spec.ts b/kyla_stearns/Angular/productMgmt/products/src/app/app.component.spec.ts new file mode 100755 index 0000000..e4ca195 --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/app/app.component.spec.ts @@ -0,0 +1,31 @@ +import { TestBed, async } from '@angular/core/testing'; +import { RouterTestingModule } from '@angular/router/testing'; +import { AppComponent } from './app.component'; +describe('AppComponent', () => { + beforeEach(async(() => { + TestBed.configureTestingModule({ + imports: [ + RouterTestingModule + ], + declarations: [ + AppComponent + ], + }).compileComponents(); + })); + it('should create the app', async(() => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.debugElement.componentInstance; + expect(app).toBeTruthy(); + })); + it(`should have as title 'app'`, async(() => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.debugElement.componentInstance; + expect(app.title).toEqual('app'); + })); + it('should render title in a h1 tag', async(() => { + const fixture = TestBed.createComponent(AppComponent); + fixture.detectChanges(); + const compiled = fixture.debugElement.nativeElement; + expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!'); + })); +}); diff --git a/kyla_stearns/Angular/productMgmt/products/src/app/app.component.ts b/kyla_stearns/Angular/productMgmt/products/src/app/app.component.ts new file mode 100755 index 0000000..64bb6db --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/app/app.component.ts @@ -0,0 +1,12 @@ +import { Component } from '@angular/core'; +import { HttpService } from './http.service'; + +@Component({ + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.css'] +}) +export class AppComponent { + title = 'app'; + constructor(private _httpService: HttpService){} +} diff --git a/kyla_stearns/Angular/productMgmt/products/src/app/app.module.ts b/kyla_stearns/Angular/productMgmt/products/src/app/app.module.ts new file mode 100755 index 0000000..f0f0901 --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/app/app.module.ts @@ -0,0 +1,38 @@ +import { BrowserModule } from '@angular/platform-browser'; +import { NgModule } from '@angular/core'; + +import { AppRoutingModule } from './app-routing.module'; +import { HttpModule } from '@angular/http'; +import { FormsModule } from '@angular/forms'; + +import { AppComponent } from './app.component'; +import { HomeComponent } from './home/home.component'; +import { ProductListComponent } from './product-list/product-list.component'; +import { EditComponent } from './edit/edit.component'; +import { NewComponent } from './new/new.component'; + +import { HttpService } from './http.service'; + + +@NgModule({ + declarations: [ + AppComponent, + HomeComponent, + ProductListComponent, + EditComponent, + NewComponent + ], + imports: [ + BrowserModule, + AppRoutingModule, + HttpModule, + FormsModule + ], + providers: [ + HttpService + ], + bootstrap: [ + AppComponent + ] +}) +export class AppModule { } diff --git a/kyla_stearns/Angular/productMgmt/products/src/app/edit/edit.component.css b/kyla_stearns/Angular/productMgmt/products/src/app/edit/edit.component.css new file mode 100755 index 0000000..54eb614 --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/app/edit/edit.component.css @@ -0,0 +1,44 @@ +#errors{ + color: red; + padding: 5px; + margin: 10px 0px 10px 0px; +} + +form{ + margin-left: 25px; +} + +label{ + display: block; + margin: 10px 0px 10px 0px; +} + +input[type=text]{ + display: block; + padding: 5px; + font-size: 14px; + margin-left: 15px; + width: 225px; +} + +input[type=submit]{ + width: 100px; + font-size: 14px; + padding: 5px; + text-align: center; + background-color: lightgrey; + vertical-align: top; + margin: 15px 15px 0px 15px; + border-radius: 5px; +} + +button{ + width: 100px; + font-size: 14px; + padding: 5px; + text-align: center; + background-color: lightgrey; + vertical-align: top; + margin: 15px 15px 0px 15px; + border-radius: 5px; +} \ No newline at end of file diff --git a/kyla_stearns/Angular/productMgmt/products/src/app/edit/edit.component.html b/kyla_stearns/Angular/productMgmt/products/src/app/edit/edit.component.html new file mode 100755 index 0000000..85c69f0 --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/app/edit/edit.component.html @@ -0,0 +1,32 @@ +
+

{{ response }}

+
+ +
+ + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/kyla_stearns/Angular/productMgmt/products/src/app/edit/edit.component.spec.ts b/kyla_stearns/Angular/productMgmt/products/src/app/edit/edit.component.spec.ts new file mode 100755 index 0000000..34ef921 --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/app/edit/edit.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { EditComponent } from './edit.component'; + +describe('EditComponent', () => { + let component: EditComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ EditComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(EditComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/kyla_stearns/Angular/productMgmt/products/src/app/edit/edit.component.ts b/kyla_stearns/Angular/productMgmt/products/src/app/edit/edit.component.ts new file mode 100755 index 0000000..53d7047 --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/app/edit/edit.component.ts @@ -0,0 +1,64 @@ +import { Component, OnInit } from '@angular/core'; +import { HttpService } from '../http.service'; +import { ActivatedRoute, Params, Router } from '@angular/router'; + +@Component({ + selector: 'app-edit', + templateUrl: './edit.component.html', + styleUrls: ['./edit.component.css'] +}) +export class EditComponent implements OnInit { + thisProduct = {}; + response: any; + constructor( + private _httpService: HttpService, + private _route: ActivatedRoute, + private _router: Router + ) { } + + ngOnInit() { + this.thisProduct = {id: '', title: '', price: '', imgLink: ''}; + this._route.params.subscribe((params: Params) => { + // console.log(Number(params['id'])); + // this.id = params['id']; + let observable = this._httpService.editProduct(params['id']); + observable.subscribe(data =>{ + data = data.json(); + console.log("Data from this thisProduct", data['this_product']); + this.thisProduct = { + id: params['id'], + title: data.this_product.title, + price: Number(data.this_product.price), + imgLink: data.this_product.imgLink + }; + }); + }); + } + + onSubmitEdit(event){ + event.preventDefault(); + console.log("Inside onSubmitEdit function with thisProduct", this.thisProduct); + // code to send off the form data (this.thisProduct) to the service + let observable = this._httpService.updateProduct(this.thisProduct); + observable.subscribe(data => { + + console.log("thisProduct subscribe to Observable", data.json()); + this.response = data.json(); + // console.log("You have successfully updated this product.", this.thisProduct); + // then reset this.thisProduct to new, clean object. + this.thisProduct = {id: '', title: '', price: '', imgLink: ''}; + this._router.navigate(['/products']); + + // THIS IS WHAT YOU WOULD USE IF YOU DECIDE TO CHANGE SERVER SIDE TO USE STATUS(400) ERROR + // observable.subscribe( (res: any) => { + // this.thisAuthor = {id: '', name: ''}; + // }; + // ( (err: any) => { + // this.response = err.error.errors.field_name.message; + // })); + + } + + }); + } +} \ No newline at end of file diff --git a/kyla_stearns/Angular/productMgmt/products/src/app/home/home.component.css b/kyla_stearns/Angular/productMgmt/products/src/app/home/home.component.css new file mode 100755 index 0000000..4cb6924 --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/app/home/home.component.css @@ -0,0 +1,8 @@ +h2{ + margin-top: 10px; +} + +p{ + font-size: 18px; + margin: 15px 0px 15px 0px; +} \ No newline at end of file diff --git a/kyla_stearns/Angular/productMgmt/products/src/app/home/home.component.html b/kyla_stearns/Angular/productMgmt/products/src/app/home/home.component.html new file mode 100755 index 0000000..39d7fd6 --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/app/home/home.component.html @@ -0,0 +1,3 @@ +

Home Page

+

Welcome to the Project Product Management! Here we can manage a set of products.

+

You are able to add your favorite products, remove old ones, and make updates.

\ No newline at end of file diff --git a/kyla_stearns/Angular/productMgmt/products/src/app/home/home.component.spec.ts b/kyla_stearns/Angular/productMgmt/products/src/app/home/home.component.spec.ts new file mode 100755 index 0000000..490e81b --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/app/home/home.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { HomeComponent } from './home.component'; + +describe('HomeComponent', () => { + let component: HomeComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ HomeComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(HomeComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/kyla_stearns/Angular/productMgmt/products/src/app/home/home.component.ts b/kyla_stearns/Angular/productMgmt/products/src/app/home/home.component.ts new file mode 100755 index 0000000..33fd770 --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/app/home/home.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-home', + templateUrl: './home.component.html', + styleUrls: ['./home.component.css'] +}) +export class HomeComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/kyla_stearns/Angular/productMgmt/products/src/app/http.service.spec.ts b/kyla_stearns/Angular/productMgmt/products/src/app/http.service.spec.ts new file mode 100755 index 0000000..c2eb030 --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/app/http.service.spec.ts @@ -0,0 +1,15 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { HttpService } from './http.service'; + +describe('HttpService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [HttpService] + }); + }); + + it('should be created', inject([HttpService], (service: HttpService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/kyla_stearns/Angular/productMgmt/products/src/app/http.service.ts b/kyla_stearns/Angular/productMgmt/products/src/app/http.service.ts new file mode 100755 index 0000000..30f2c32 --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/app/http.service.ts @@ -0,0 +1,34 @@ +import { Injectable } from '@angular/core'; +import { Http } from '@angular/http'; // import Http + +@Injectable() +export class HttpService { + + constructor(private _http: Http) { } + + getAllProducts(){ + console.log("Inside getAllProducts function"); + return this._http.get('/products'); + } + + createProduct(newProduct){ + console.log("Inside createProduct function with newProduct", newProduct); + return this._http.post('/products/new', newProduct); + } + + editProduct(id){ + console.log("Inside editProduct function with id", id); + return this._http.get('/products/edit/'+id); + } + + updateProduct(editProduct){ + console.log("Inside updateProduct function with editProduct", editProduct); + return this._http.patch('/products/update/'+editProduct.id, editProduct); + } + + deleteProduct(id){ + console.log("Inside deleteProduct function with id", id); + return this._http.delete('/products/'+id); + } +} + diff --git a/kyla_stearns/Angular/productMgmt/products/src/app/new/new.component.css b/kyla_stearns/Angular/productMgmt/products/src/app/new/new.component.css new file mode 100755 index 0000000..4b489bd --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/app/new/new.component.css @@ -0,0 +1,48 @@ +#errors{ + color: red; + padding: 5px; + margin: 10px 0px 10px 0px; +} + +h4{ + margin-top: 10px; +} + +form{ + margin-left: 25px; +} + +label{ + display: block; + margin: 10px 0px 10px 0px; +} + +input[type=text]{ + display: block; + padding: 5px; + font-size: 14px; + margin-left: 15px; + width: 225px; +} + +input[type=submit]{ + width: 100px; + font-size: 14px; + padding: 5px; + text-align: center; + background-color: lightgrey; + vertical-align: top; + margin: 15px 15px 0px 15px; + border-radius: 5px; +} + +button{ + width: 100px; + font-size: 14px; + padding: 5px; + text-align: center; + background-color: lightgrey; + vertical-align: top; + margin: 15px 15px 0px 15px; + border-radius: 5px; +} \ No newline at end of file diff --git a/kyla_stearns/Angular/productMgmt/products/src/app/new/new.component.html b/kyla_stearns/Angular/productMgmt/products/src/app/new/new.component.html new file mode 100755 index 0000000..ac12eae --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/app/new/new.component.html @@ -0,0 +1,36 @@ +
+

{{ response }}

+
+ +

Add a new product:

+ +
+ + + + + + + + + + + + + +
\ No newline at end of file diff --git a/kyla_stearns/Angular/productMgmt/products/src/app/new/new.component.spec.ts b/kyla_stearns/Angular/productMgmt/products/src/app/new/new.component.spec.ts new file mode 100755 index 0000000..3451b0f --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/app/new/new.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NewComponent } from './new.component'; + +describe('NewComponent', () => { + let component: NewComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ NewComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(NewComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/kyla_stearns/Angular/productMgmt/products/src/app/new/new.component.ts b/kyla_stearns/Angular/productMgmt/products/src/app/new/new.component.ts new file mode 100755 index 0000000..8420fe9 --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/app/new/new.component.ts @@ -0,0 +1,47 @@ +import { Component, OnInit } from '@angular/core'; +import { HttpService } from '../http.service'; +import { ActivatedRoute, Params, Router } from '@angular/router'; +// not really using params in this case, but easy to bring in in case want to change later + +@Component({ + selector: 'app-new', + templateUrl: './new.component.html', + styleUrls: ['./new.component.css'] +}) +export class NewComponent implements OnInit { + newProduct = {}; + response: any; + constructor( + private _httpService: HttpService, + private _route: ActivatedRoute, + private _router: Router + ) { } + + ngOnInit() { + this.newProduct = {id: '', title: '', price: '', imgLink: ''}; + } + onSubmitNew(event){ + // CODE TO SUBMIT FORM AND SEND TO DB + event.preventDefault(); + // code to send off the form data (this.newProduct) to the service + // console.log("Updated newProduct", this.newProduct); + let observable = this._httpService.createProduct(this.newProduct); + observable.subscribe(data => { + // console.log("newProduct subscribe to Observable", data.json()); + this.response = data.json(); + // then reset this.newProduct to new, clean object. + this.newProduct = {id: '', title: '', price: '', imgLink: ''}; + // this._router.navigate(['/home']); + // can re-route home but i chose to stay on the page, clear the form, and show validations + + // THIS IS WHAT YOU WOULD USE IF YOU DECIDE TO CHANGE SERVER SIDE TO USE STATUS(400) ERROR + // observable.subscribe( (res: any) => { + // this.thisAuthor = {id: '', name: ''}; + // }; + // ( (err: any) => { + // this.response = err.error.errors.field_name.message; + // })); + + }) + } +} diff --git a/kyla_stearns/Angular/productMgmt/products/src/app/product-list/product-list.component.css b/kyla_stearns/Angular/productMgmt/products/src/app/product-list/product-list.component.css new file mode 100755 index 0000000..56f8956 --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/app/product-list/product-list.component.css @@ -0,0 +1,36 @@ +h2{ + margin-top: 10px; +} + +p{ + font-size: 18px; + margin: 15px 0px 15px 0px; +} + +#product{ + vertical-align: top; + display: inline-block; + width: 20%; + height: 350px; + border: 2px solid black; + padding: 5px; + margin: 10px; + text-align: center; +} + +img{ + display: block; + width: 100%; + height: 200px; +} + +button{ + width: 75px; + font-size: 14px; + padding: 5px; + text-align: center; + background-color: lightgrey; + vertical-align: top; + margin: 0px 20px 0px 15px; + border-radius: 5px; +} \ No newline at end of file diff --git a/kyla_stearns/Angular/productMgmt/products/src/app/product-list/product-list.component.html b/kyla_stearns/Angular/productMgmt/products/src/app/product-list/product-list.component.html new file mode 100755 index 0000000..0103733 --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/app/product-list/product-list.component.html @@ -0,0 +1,9 @@ +

Product List

+ +
+ product +

{{ element.title }}

+

${{ element.price }}

+ + +
\ No newline at end of file diff --git a/kyla_stearns/Angular/productMgmt/products/src/app/product-list/product-list.component.spec.ts b/kyla_stearns/Angular/productMgmt/products/src/app/product-list/product-list.component.spec.ts new file mode 100755 index 0000000..a2c901b --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/app/product-list/product-list.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ProductListComponent } from './product-list.component'; + +describe('ProductListComponent', () => { + let component: ProductListComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ProductListComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ProductListComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/kyla_stearns/Angular/productMgmt/products/src/app/product-list/product-list.component.ts b/kyla_stearns/Angular/productMgmt/products/src/app/product-list/product-list.component.ts new file mode 100755 index 0000000..06c9170 --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/app/product-list/product-list.component.ts @@ -0,0 +1,43 @@ +import { Component, OnInit } from '@angular/core'; +import { HttpService } from '../http.service'; +import { ActivatedRoute, Params, Router } from '@angular/router'; + +@Component({ + selector: 'app-product-list', + templateUrl: './product-list.component.html', + styleUrls: ['./product-list.component.css'] +}) +export class ProductListComponent implements OnInit { + products = []; + constructor( + private _httpService: HttpService, + private _route: ActivatedRoute, + private _router: Router + ) { } + + ngOnInit() { + this.getProducts(); + } + + getProducts(){ + let observable = this._httpService.getAllProducts(); + observable.subscribe(data => { // subscribe to Observable in order to get updates when you receive a response + data = data.json(); + console.log("Got our products!", data); + console.log( "This is all_products of data", data['all_products']); + this.products = data['all_products']; + }); + } + + deleteProduct(id){ + console.log("inside component delete with id", id); + let observable = this._httpService.deleteProduct(id); + observable.subscribe(data => { // subscribe to Observable in order to get updates when you receive a response + console.log("deleteProduct subscribe to Observable", data.json()); + this.response = data.json(); // inject HttpService as dependency + this.getProducts(); + // this._router.navigate(['/']); + // can re-route home but i chose to stay on the page, clear the form, and show validations + }); + } +} \ No newline at end of file diff --git a/kyla_stearns/Angular/productMgmt/products/src/assets/.gitkeep b/kyla_stearns/Angular/productMgmt/products/src/assets/.gitkeep new file mode 100755 index 0000000..e69de29 diff --git a/kyla_stearns/Angular/productMgmt/products/src/environments/environment.prod.ts b/kyla_stearns/Angular/productMgmt/products/src/environments/environment.prod.ts new file mode 100755 index 0000000..3612073 --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/environments/environment.prod.ts @@ -0,0 +1,3 @@ +export const environment = { + production: true +}; diff --git a/kyla_stearns/Angular/productMgmt/products/src/environments/environment.ts b/kyla_stearns/Angular/productMgmt/products/src/environments/environment.ts new file mode 100755 index 0000000..b7f639a --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/environments/environment.ts @@ -0,0 +1,8 @@ +// The file contents for the current environment will overwrite these during build. +// The build system defaults to the dev environment which uses `environment.ts`, but if you do +// `ng build --env=prod` then `environment.prod.ts` will be used instead. +// The list of which env maps to which file can be found in `.angular-cli.json`. + +export const environment = { + production: false +}; diff --git a/kyla_stearns/Angular/productMgmt/products/src/favicon.ico b/kyla_stearns/Angular/productMgmt/products/src/favicon.ico new file mode 100755 index 0000000..8081c7c Binary files /dev/null and b/kyla_stearns/Angular/productMgmt/products/src/favicon.ico differ diff --git a/kyla_stearns/Angular/productMgmt/products/src/favicon.png b/kyla_stearns/Angular/productMgmt/products/src/favicon.png new file mode 100755 index 0000000..caf109f Binary files /dev/null and b/kyla_stearns/Angular/productMgmt/products/src/favicon.png differ diff --git a/kyla_stearns/Angular/productMgmt/products/src/index.html b/kyla_stearns/Angular/productMgmt/products/src/index.html new file mode 100755 index 0000000..18ef9bb --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/index.html @@ -0,0 +1,14 @@ + + + + + Products + + + + + + + + + diff --git a/kyla_stearns/Angular/productMgmt/products/src/main.ts b/kyla_stearns/Angular/productMgmt/products/src/main.ts new file mode 100755 index 0000000..91ec6da --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/main.ts @@ -0,0 +1,12 @@ +import { enableProdMode } from '@angular/core'; +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + +import { AppModule } from './app/app.module'; +import { environment } from './environments/environment'; + +if (environment.production) { + enableProdMode(); +} + +platformBrowserDynamic().bootstrapModule(AppModule) + .catch(err => console.log(err)); diff --git a/kyla_stearns/Angular/productMgmt/products/src/polyfills.ts b/kyla_stearns/Angular/productMgmt/products/src/polyfills.ts new file mode 100755 index 0000000..af84770 --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/polyfills.ts @@ -0,0 +1,79 @@ +/** + * This file includes polyfills needed by Angular and is loaded before the app. + * You can add your own extra polyfills to this file. + * + * This file is divided into 2 sections: + * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. + * 2. Application imports. Files imported after ZoneJS that should be loaded before your main + * file. + * + * The current setup is for so-called "evergreen" browsers; the last versions of browsers that + * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), + * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. + * + * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html + */ + +/*************************************************************************************************** + * BROWSER POLYFILLS + */ + +/** IE9, IE10 and IE11 requires all of the following polyfills. **/ +// import 'core-js/es6/symbol'; +// import 'core-js/es6/object'; +// import 'core-js/es6/function'; +// import 'core-js/es6/parse-int'; +// import 'core-js/es6/parse-float'; +// import 'core-js/es6/number'; +// import 'core-js/es6/math'; +// import 'core-js/es6/string'; +// import 'core-js/es6/date'; +// import 'core-js/es6/array'; +// import 'core-js/es6/regexp'; +// import 'core-js/es6/map'; +// import 'core-js/es6/weak-map'; +// import 'core-js/es6/set'; + +/** IE10 and IE11 requires the following for NgClass support on SVG elements */ +// import 'classlist.js'; // Run `npm install --save classlist.js`. + +/** IE10 and IE11 requires the following for the Reflect API. */ +// import 'core-js/es6/reflect'; + + +/** Evergreen browsers require these. **/ +// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove. +import 'core-js/es7/reflect'; + + +/** + * Required to support Web Animations `@angular/platform-browser/animations`. + * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation + **/ +// import 'web-animations-js'; // Run `npm install --save web-animations-js`. + +/** + * By default, zone.js will patch all possible macroTask and DomEvents + * user can disable parts of macroTask/DomEvents patch by setting following flags + */ + + // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame + // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick + // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames + + /* + * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js + * with the following flag, it will bypass `zone.js` patch for IE/Edge + */ +// (window as any).__Zone_enable_cross_context_check = true; + +/*************************************************************************************************** + * Zone JS is required by default for Angular itself. + */ +import 'zone.js/dist/zone'; // Included with Angular CLI. + + + +/*************************************************************************************************** + * APPLICATION IMPORTS + */ diff --git a/kyla_stearns/Angular/productMgmt/products/src/styles.css b/kyla_stearns/Angular/productMgmt/products/src/styles.css new file mode 100755 index 0000000..90d4ee0 --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/styles.css @@ -0,0 +1 @@ +/* You can add global styles to this file, and also import other style files */ diff --git a/kyla_stearns/Angular/productMgmt/products/src/test.ts b/kyla_stearns/Angular/productMgmt/products/src/test.ts new file mode 100755 index 0000000..1631789 --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/test.ts @@ -0,0 +1,20 @@ +// This file is required by karma.conf.js and loads recursively all the .spec and framework files + +import 'zone.js/dist/zone-testing'; +import { getTestBed } from '@angular/core/testing'; +import { + BrowserDynamicTestingModule, + platformBrowserDynamicTesting +} from '@angular/platform-browser-dynamic/testing'; + +declare const require: any; + +// First, initialize the Angular testing environment. +getTestBed().initTestEnvironment( + BrowserDynamicTestingModule, + platformBrowserDynamicTesting() +); +// Then we find all the tests. +const context = require.context('./', true, /\.spec\.ts$/); +// And load the modules. +context.keys().map(context); diff --git a/kyla_stearns/Angular/productMgmt/products/src/tsconfig.app.json b/kyla_stearns/Angular/productMgmt/products/src/tsconfig.app.json new file mode 100755 index 0000000..39ba8db --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/tsconfig.app.json @@ -0,0 +1,13 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/app", + "baseUrl": "./", + "module": "es2015", + "types": [] + }, + "exclude": [ + "test.ts", + "**/*.spec.ts" + ] +} diff --git a/kyla_stearns/Angular/productMgmt/products/src/tsconfig.spec.json b/kyla_stearns/Angular/productMgmt/products/src/tsconfig.spec.json new file mode 100755 index 0000000..ac22a29 --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/tsconfig.spec.json @@ -0,0 +1,19 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/spec", + "baseUrl": "./", + "module": "commonjs", + "types": [ + "jasmine", + "node" + ] + }, + "files": [ + "test.ts" + ], + "include": [ + "**/*.spec.ts", + "**/*.d.ts" + ] +} diff --git a/kyla_stearns/Angular/productMgmt/products/src/typings.d.ts b/kyla_stearns/Angular/productMgmt/products/src/typings.d.ts new file mode 100755 index 0000000..ef5c7bd --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/src/typings.d.ts @@ -0,0 +1,5 @@ +/* SystemJS module definition */ +declare var module: NodeModule; +interface NodeModule { + id: string; +} diff --git a/kyla_stearns/Angular/productMgmt/products/tsconfig.json b/kyla_stearns/Angular/productMgmt/products/tsconfig.json new file mode 100755 index 0000000..a6c016b --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist/out-tsc", + "sourceMap": true, + "declaration": false, + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "target": "es5", + "typeRoots": [ + "node_modules/@types" + ], + "lib": [ + "es2017", + "dom" + ] + } +} diff --git a/kyla_stearns/Angular/productMgmt/products/tslint.json b/kyla_stearns/Angular/productMgmt/products/tslint.json new file mode 100755 index 0000000..9963d6c --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/products/tslint.json @@ -0,0 +1,143 @@ +{ + "rulesDirectory": [ + "node_modules/codelyzer" + ], + "rules": { + "arrow-return-shorthand": true, + "callable-types": true, + "class-name": true, + "comment-format": [ + true, + "check-space" + ], + "curly": true, + "deprecation": { + "severity": "warn" + }, + "eofline": true, + "forin": true, + "import-blacklist": [ + true, + "rxjs", + "rxjs/Rx" + ], + "import-spacing": true, + "indent": [ + true, + "spaces" + ], + "interface-over-type-literal": true, + "label-position": true, + "max-line-length": [ + true, + 140 + ], + "member-access": false, + "member-ordering": [ + true, + { + "order": [ + "static-field", + "instance-field", + "static-method", + "instance-method" + ] + } + ], + "no-arg": true, + "no-bitwise": true, + "no-console": [ + true, + "debug", + "info", + "time", + "timeEnd", + "trace" + ], + "no-construct": true, + "no-debugger": true, + "no-duplicate-super": true, + "no-empty": false, + "no-empty-interface": true, + "no-eval": true, + "no-inferrable-types": [ + true, + "ignore-params" + ], + "no-misused-new": true, + "no-non-null-assertion": true, + "no-shadowed-variable": true, + "no-string-literal": false, + "no-string-throw": true, + "no-switch-case-fall-through": true, + "no-trailing-whitespace": true, + "no-unnecessary-initializer": true, + "no-unused-expression": true, + "no-use-before-declare": true, + "no-var-keyword": true, + "object-literal-sort-keys": false, + "one-line": [ + true, + "check-open-brace", + "check-catch", + "check-else", + "check-whitespace" + ], + "prefer-const": true, + "quotemark": [ + true, + "single" + ], + "radix": true, + "semicolon": [ + true, + "always" + ], + "triple-equals": [ + true, + "allow-null-check" + ], + "typedef-whitespace": [ + true, + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + } + ], + "unified-signatures": true, + "variable-name": false, + "whitespace": [ + true, + "check-branch", + "check-decl", + "check-operator", + "check-separator", + "check-type" + ], + "directive-selector": [ + true, + "attribute", + "app", + "camelCase" + ], + "component-selector": [ + true, + "element", + "app", + "kebab-case" + ], + "no-output-on-prefix": true, + "use-input-property-decorator": true, + "use-output-property-decorator": true, + "use-host-property-decorator": true, + "no-input-rename": true, + "no-output-rename": true, + "use-life-cycle-interface": true, + "use-pipe-transform-interface": true, + "component-class-suffix": true, + "directive-class-suffix": true + } +} diff --git a/kyla_stearns/Angular/productMgmt/server.js b/kyla_stearns/Angular/productMgmt/server.js new file mode 100755 index 0000000..1a3ae2c --- /dev/null +++ b/kyla_stearns/Angular/productMgmt/server.js @@ -0,0 +1,129 @@ +let express = require('express'); + app = express(); + bodyParser = require('body-parser'); + mongoose = require('mongoose'); require('mongoose-type-url'); + // ** MAKE SURE TO RUN ** npm install mongoose-type-url + uniqueValidator = require('mongoose-unique-validator'); + ProductsSchema = new mongoose.Schema({ + title: { + type: String, + required: [true, "Must enter a title."], + minlength: [4, "Title must be at least 4 characters."] + }, + price: { + type: Number, + required: [true, "Must enter a price."], + min: [1, "Price must be at least one dollar."] + }, + imgLink: { + type: mongoose.SchemaTypes.Url, + required: false, + // unique: [true, "Link must be valid."] + // NOT SURE IF NEED UNIQUE WITH mongoose-type-url + } + }, {timestamps: true}); +// use unique validator here +ProductsSchema.plugin(uniqueValidator); + +app.use(bodyParser.json()); +app.use(express.static( __dirname + '/products/dist' )); + +// connect to the database -- make sure after localhost/ you put in the db name you created +mongoose.connect('mongodb://localhost/products'); +// use native promises -- uses the promise library to save an object +mongoose.Promise = global.Promise +// Set this Schema in our Models as 'Product' +mongoose.model('Product', ProductsSchema); +// Retrieve this Schema from our Models, named 'Product' +// MOST IMPORTANT -- get this blueprint by making a new schema instance from the mongoose.Schema() +// object constructor +let Product = mongoose.model('Product'); + +app.get('/products', (req,res) => { + // GET ALL PRODUCTS + Product.find({}, (err, all_products) => { + if(err){ + console.log("There's an error finding all products", err); + res.json(err.message); + // res.status(400).json(err); + } + else{ + console.log("Successfully retrieved products", all_products); + res.json({all_products: all_products}); + } + }); +}); + +app.post('/products/new', (req,res) => { + // CREATE A NEW PRODUCT + console.log("Inside POST new product with form data", req.body); + let new_product = new Product({title: req.body.title, price: req.body.price, imgLink: req.body.imgLink}); + new_product.save((err) => { + if(err){ + console.log("There's an error creating a new product.", err); + res.json(err.message); + // res.status(400).json(err); + } + else{ + console.log("Successfully created new product", new_product); + res.json("You have successfully added an product!"); + } + }); +}); + +app.get('/products/edit/:id', (req,res) => { + // GET SPECIFIC PRODUCT BY ID -- best to use findOne so you don't have more than 1 + Product.findOne({_id: req.params.id}, (err, this_product) => { + if(err){ + console.log("There's an error getting this product.", err); + res.json(err.message); + // res.status(400).json(err); + } + else{ + console.log("Successfully retrieved this product", this_product); + res.json({this_product: this_product}); + } + }); +}); + +app.patch('/products/update/:id', (req,res) => { + // UPDATE SPECIFIC PRODUCT BY ID + console.log("Inside server .put to update product", req.body); + Product.update( + {_id: req.params.id}, + {title: req.body.title, price: req.body.price, imgLink: req.body.imgLink}, + {runValidators: true}, + (err, this_product) => { + if(err){ + console.log("There's an error updating this product", err.message); + res.json(err.message); + // res.status(400).json(err); + } + else{ + console.log("Successfully updated this product", this_product); + res.json({this_product: this_product}); + } + }); +}); + +app.delete('/products/:id', (req,res) => { + // DELETE SPECIFIC AUTHOR BY ID + console.log("Inside the DELETE function", req.params.id); + Product.remove({_id: req.params.id}, (err) => { + // if there is an error, console.log that something went wrong + if(err){ + console.log("There's an error deleting this product.", err); + res.json(err.message); + // res.status(400).json(err); + } + else{ + console.log("Successfully deleted this product."); + res.json("You have successfully deleted this product!"); + } + }); +}); + +app.listen(5678, () => { + console.log('Listening on port 5678'); +}) + diff --git a/kyla_stearns/Angular/products2 b/kyla_stearns/Angular/products2 new file mode 160000 index 0000000..2aec7ad --- /dev/null +++ b/kyla_stearns/Angular/products2 @@ -0,0 +1 @@ +Subproject commit 2aec7adfbcc69123d04cdbf489d25478ca510896 diff --git a/kyla_stearns/Angular/restaurants/IP.txt b/kyla_stearns/Angular/restaurants/IP.txt new file mode 100755 index 0000000..48e3e20 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/IP.txt @@ -0,0 +1 @@ +AWS private IP: 172.31.2.221 \ No newline at end of file diff --git a/kyla_stearns/Angular/restaurants/client/.angular-cli.json b/kyla_stearns/Angular/restaurants/client/.angular-cli.json new file mode 100755 index 0000000..3d965d7 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/.angular-cli.json @@ -0,0 +1,60 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "project": { + "name": "client" + }, + "apps": [ + { + "root": "src", + "outDir": "dist", + "assets": [ + "assets", + "favicon.png" + ], + "index": "index.html", + "main": "main.ts", + "polyfills": "polyfills.ts", + "test": "test.ts", + "tsconfig": "tsconfig.app.json", + "testTsconfig": "tsconfig.spec.json", + "prefix": "app", + "styles": [ + "styles.css" + ], + "scripts": [], + "environmentSource": "environments/environment.ts", + "environments": { + "dev": "environments/environment.ts", + "prod": "environments/environment.prod.ts" + } + } + ], + "e2e": { + "protractor": { + "config": "./protractor.conf.js" + } + }, + "lint": [ + { + "project": "src/tsconfig.app.json", + "exclude": "**/node_modules/**" + }, + { + "project": "src/tsconfig.spec.json", + "exclude": "**/node_modules/**" + }, + { + "project": "e2e/tsconfig.e2e.json", + "exclude": "**/node_modules/**" + } + ], + "test": { + "karma": { + "config": "./karma.conf.js" + } + }, + "defaults": { + "styleExt": "css", + "component": {} + } +} diff --git a/kyla_stearns/Angular/restaurants/client/.editorconfig b/kyla_stearns/Angular/restaurants/client/.editorconfig new file mode 100755 index 0000000..6e87a00 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/.editorconfig @@ -0,0 +1,13 @@ +# Editor configuration, see http://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/kyla_stearns/Angular/restaurants/client/README.md b/kyla_stearns/Angular/restaurants/client/README.md new file mode 100755 index 0000000..882badc --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/README.md @@ -0,0 +1,27 @@ +# Client + +This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.7.3. + +## Development server + +Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. + +## Code scaffolding + +Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. + +## Build + +Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build. + +## Running unit tests + +Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Running end-to-end tests + +Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). + +## Further help + +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). diff --git a/kyla_stearns/Angular/restaurants/client/e2e/app.e2e-spec.ts b/kyla_stearns/Angular/restaurants/client/e2e/app.e2e-spec.ts new file mode 100755 index 0000000..2b4e850 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/e2e/app.e2e-spec.ts @@ -0,0 +1,14 @@ +import { AppPage } from './app.po'; + +describe('client App', () => { + let page: AppPage; + + beforeEach(() => { + page = new AppPage(); + }); + + it('should display welcome message', () => { + page.navigateTo(); + expect(page.getParagraphText()).toEqual('Welcome to app!'); + }); +}); diff --git a/kyla_stearns/Angular/restaurants/client/e2e/app.po.ts b/kyla_stearns/Angular/restaurants/client/e2e/app.po.ts new file mode 100755 index 0000000..82ea75b --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/e2e/app.po.ts @@ -0,0 +1,11 @@ +import { browser, by, element } from 'protractor'; + +export class AppPage { + navigateTo() { + return browser.get('/'); + } + + getParagraphText() { + return element(by.css('app-root h1')).getText(); + } +} diff --git a/kyla_stearns/Angular/restaurants/client/e2e/tsconfig.e2e.json b/kyla_stearns/Angular/restaurants/client/e2e/tsconfig.e2e.json new file mode 100755 index 0000000..1d9e5ed --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/e2e/tsconfig.e2e.json @@ -0,0 +1,14 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/e2e", + "baseUrl": "./", + "module": "commonjs", + "target": "es5", + "types": [ + "jasmine", + "jasminewd2", + "node" + ] + } +} diff --git a/kyla_stearns/Angular/restaurants/client/karma.conf.js b/kyla_stearns/Angular/restaurants/client/karma.conf.js new file mode 100755 index 0000000..af139fa --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/karma.conf.js @@ -0,0 +1,33 @@ +// Karma configuration file, see link for more information +// https://karma-runner.github.io/1.0/config/configuration-file.html + +module.exports = function (config) { + config.set({ + basePath: '', + frameworks: ['jasmine', '@angular/cli'], + plugins: [ + require('karma-jasmine'), + require('karma-chrome-launcher'), + require('karma-jasmine-html-reporter'), + require('karma-coverage-istanbul-reporter'), + require('@angular/cli/plugins/karma') + ], + client:{ + clearContext: false // leave Jasmine Spec Runner output visible in browser + }, + coverageIstanbulReporter: { + reports: [ 'html', 'lcovonly' ], + fixWebpackSourcePaths: true + }, + angularCli: { + environment: 'dev' + }, + reporters: ['progress', 'kjhtml'], + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: ['Chrome'], + singleRun: false + }); +}; diff --git a/kyla_stearns/Angular/restaurants/client/package.json b/kyla_stearns/Angular/restaurants/client/package.json new file mode 100755 index 0000000..ed2fdea --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/package.json @@ -0,0 +1,48 @@ +{ + "name": "client", + "version": "0.0.0", + "license": "MIT", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build --prod", + "test": "ng test", + "lint": "ng lint", + "e2e": "ng e2e" + }, + "private": true, + "dependencies": { + "@angular/animations": "^5.2.0", + "@angular/common": "^5.2.0", + "@angular/compiler": "^5.2.0", + "@angular/core": "^5.2.0", + "@angular/forms": "^5.2.0", + "@angular/http": "^5.2.0", + "@angular/platform-browser": "^5.2.0", + "@angular/platform-browser-dynamic": "^5.2.0", + "@angular/router": "^5.2.0", + "core-js": "^2.4.1", + "rxjs": "^5.5.6", + "zone.js": "^0.8.19" + }, + "devDependencies": { + "@angular/cli": "~1.7.3", + "@angular/compiler-cli": "^5.2.0", + "@angular/language-service": "^5.2.0", + "@types/jasmine": "~2.8.3", + "@types/jasminewd2": "~2.0.2", + "@types/node": "~6.0.60", + "codelyzer": "^4.0.1", + "jasmine-core": "~2.8.0", + "jasmine-spec-reporter": "~4.2.1", + "karma": "~2.0.0", + "karma-chrome-launcher": "~2.2.0", + "karma-coverage-istanbul-reporter": "^1.2.1", + "karma-jasmine": "~1.1.0", + "karma-jasmine-html-reporter": "^0.2.2", + "protractor": "~5.1.2", + "ts-node": "~4.1.0", + "tslint": "~5.9.1", + "typescript": "~2.5.3" + } +} diff --git a/kyla_stearns/Angular/restaurants/client/protractor.conf.js b/kyla_stearns/Angular/restaurants/client/protractor.conf.js new file mode 100755 index 0000000..7ee3b5e --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/protractor.conf.js @@ -0,0 +1,28 @@ +// Protractor configuration file, see link for more information +// https://github.com/angular/protractor/blob/master/lib/config.ts + +const { SpecReporter } = require('jasmine-spec-reporter'); + +exports.config = { + allScriptsTimeout: 11000, + specs: [ + './e2e/**/*.e2e-spec.ts' + ], + capabilities: { + 'browserName': 'chrome' + }, + directConnect: true, + baseUrl: 'http://localhost:4200/', + framework: 'jasmine', + jasmineNodeOpts: { + showColors: true, + defaultTimeoutInterval: 30000, + print: function() {} + }, + onPrepare() { + require('ts-node').register({ + project: 'e2e/tsconfig.e2e.json' + }); + jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); + } +}; diff --git a/kyla_stearns/Angular/restaurants/client/src/app/app-routing.module.ts b/kyla_stearns/Angular/restaurants/client/src/app/app-routing.module.ts new file mode 100755 index 0000000..0888261 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/app-routing.module.ts @@ -0,0 +1,23 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { HomeComponent } from './home/home.component'; +import { NewRestaurantComponent } from './new-restaurant/new-restaurant.component'; +import { EditRestaurantComponent } from './edit-restaurant/edit-restaurant.component'; +import { ReviewComponent } from './review/review.component'; +import { NewReviewComponent } from './new-review/new-review.component'; + +const routes: Routes = [ + {path: '', pathMatch: 'full', component: HomeComponent }, + {path: 'home', component: HomeComponent }, + {path: 'new', component: NewRestaurantComponent}, + {path: 'edit/:id', component: EditRestaurantComponent}, + {path: 'reviews/:id', component: ReviewComponent}, + {path: 'write/:id', component: NewReviewComponent} +]; + +@NgModule({ + imports: [RouterModule.forRoot(routes)], + exports: [RouterModule] +}) +export class AppRoutingModule { } diff --git a/kyla_stearns/Angular/restaurants/client/src/app/app.component.css b/kyla_stearns/Angular/restaurants/client/src/app/app.component.css new file mode 100755 index 0000000..8812d03 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/app.component.css @@ -0,0 +1,30 @@ +*{ + margin: 0px; + padding: 0px; + font-family: Arial, sans-serif; +} + +body{ + width: 970px; + margin: auto; +} + +header{ + width: 100%; + padding: 10px; +} + +img{ + height: 100px; + width: 100px; + margin: -10px 10px 0px 15px; +} + +h1{ + display: inline; + vertical-align: top; +} + +main{ + padding: 15px; +} \ No newline at end of file diff --git a/kyla_stearns/Angular/restaurants/client/src/app/app.component.html b/kyla_stearns/Angular/restaurants/client/src/app/app.component.html new file mode 100755 index 0000000..45e62a2 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/app.component.html @@ -0,0 +1,10 @@ +
+ food logo +

Let's eat!

+
+ +
+ + + +
\ No newline at end of file diff --git a/kyla_stearns/Angular/restaurants/client/src/app/app.component.spec.ts b/kyla_stearns/Angular/restaurants/client/src/app/app.component.spec.ts new file mode 100755 index 0000000..e4ca195 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/app.component.spec.ts @@ -0,0 +1,31 @@ +import { TestBed, async } from '@angular/core/testing'; +import { RouterTestingModule } from '@angular/router/testing'; +import { AppComponent } from './app.component'; +describe('AppComponent', () => { + beforeEach(async(() => { + TestBed.configureTestingModule({ + imports: [ + RouterTestingModule + ], + declarations: [ + AppComponent + ], + }).compileComponents(); + })); + it('should create the app', async(() => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.debugElement.componentInstance; + expect(app).toBeTruthy(); + })); + it(`should have as title 'app'`, async(() => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.debugElement.componentInstance; + expect(app.title).toEqual('app'); + })); + it('should render title in a h1 tag', async(() => { + const fixture = TestBed.createComponent(AppComponent); + fixture.detectChanges(); + const compiled = fixture.debugElement.nativeElement; + expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!'); + })); +}); diff --git a/kyla_stearns/Angular/restaurants/client/src/app/app.component.ts b/kyla_stearns/Angular/restaurants/client/src/app/app.component.ts new file mode 100755 index 0000000..64bb6db --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/app.component.ts @@ -0,0 +1,12 @@ +import { Component } from '@angular/core'; +import { HttpService } from './http.service'; + +@Component({ + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.css'] +}) +export class AppComponent { + title = 'app'; + constructor(private _httpService: HttpService){} +} diff --git a/kyla_stearns/Angular/restaurants/client/src/app/app.module.ts b/kyla_stearns/Angular/restaurants/client/src/app/app.module.ts new file mode 100755 index 0000000..d493a35 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/app.module.ts @@ -0,0 +1,40 @@ +import { BrowserModule } from '@angular/platform-browser'; +import { NgModule } from '@angular/core'; + +import { AppRoutingModule } from './app-routing.module'; +import { HttpModule } from '@angular/http'; +import { FormsModule } from '@angular/forms'; + +import { AppComponent } from './app.component'; +import { HomeComponent } from './home/home.component'; +import { NewRestaurantComponent } from './new-restaurant/new-restaurant.component'; +import { EditRestaurantComponent } from './edit-restaurant/edit-restaurant.component'; +import { ReviewComponent } from './review/review.component'; +import { NewReviewComponent } from './new-review/new-review.component'; + +import { HttpService } from './http.service'; + + +@NgModule({ + declarations: [ + AppComponent, + HomeComponent, + NewRestaurantComponent, + EditRestaurantComponent, + ReviewComponent, + NewReviewComponent + ], + imports: [ + BrowserModule, + AppRoutingModule, + HttpModule, + FormsModule + ], + providers: [ + HttpService + ], + bootstrap: [ + AppComponent + ] +}) +export class AppModule { } diff --git a/kyla_stearns/Angular/restaurants/client/src/app/edit-restaurant/edit-restaurant.component.css b/kyla_stearns/Angular/restaurants/client/src/app/edit-restaurant/edit-restaurant.component.css new file mode 100755 index 0000000..83c2ec1 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/edit-restaurant/edit-restaurant.component.css @@ -0,0 +1,49 @@ +#errors{ + color: red; + padding: 5px; + margin: 10px 0px 10px 0px; +} + +h4{ + margin-top: 10px; +} + +p{ + font-size: 18px; + margin: 15px 0px 15px 0px; +} + +label{ + display: block; + margin: 10px 0px 10px 0px; +} + +input[type=text]{ + display: block; + padding: 5px; + font-size: 14px; + margin-left: 15px; + width: 225px; +} + +input[type=submit]{ + width: 100px; + font-size: 14px; + padding: 5px; + text-align: center; + background-color: #4EBEFB; + vertical-align: top; + margin: 15px 15px 0px 15px; + border-radius: 5px; +} + +button{ + width: 100px; + font-size: 14px; + padding: 5px; + text-align: center; + background-color: lightgrey; + vertical-align: top; + margin: 15px 15px 0px 15px; + border-radius: 5px; +} \ No newline at end of file diff --git a/kyla_stearns/Angular/restaurants/client/src/app/edit-restaurant/edit-restaurant.component.html b/kyla_stearns/Angular/restaurants/client/src/app/edit-restaurant/edit-restaurant.component.html new file mode 100755 index 0000000..ddea94a --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/edit-restaurant/edit-restaurant.component.html @@ -0,0 +1,24 @@ +
+

{{ response.name.message }}

+

{{ response.cuisine.message }}

+
+ +

Edit this restaurant:

+ +
+ + + + + + + + + +
\ No newline at end of file diff --git a/kyla_stearns/Angular/restaurants/client/src/app/edit-restaurant/edit-restaurant.component.spec.ts b/kyla_stearns/Angular/restaurants/client/src/app/edit-restaurant/edit-restaurant.component.spec.ts new file mode 100755 index 0000000..7991ae1 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/edit-restaurant/edit-restaurant.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { EditRestaurantComponent } from './edit-restaurant.component'; + +describe('EditRestaurantComponent', () => { + let component: EditRestaurantComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ EditRestaurantComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(EditRestaurantComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/kyla_stearns/Angular/restaurants/client/src/app/edit-restaurant/edit-restaurant.component.ts b/kyla_stearns/Angular/restaurants/client/src/app/edit-restaurant/edit-restaurant.component.ts new file mode 100755 index 0000000..62e1bce --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/edit-restaurant/edit-restaurant.component.ts @@ -0,0 +1,56 @@ +import { Component, OnInit } from '@angular/core'; +import { HttpService } from '../http.service'; +import { ActivatedRoute, Params, Router } from '@angular/router'; + +@Component({ + selector: 'app-edit-restaurant', + templateUrl: './edit-restaurant.component.html', + styleUrls: ['./edit-restaurant.component.css'] +}) +export class EditRestaurantComponent implements OnInit { + thisRestaurant = {}; + response: any; + constructor( + private _httpService: HttpService, + private _route: ActivatedRoute, + private _router: Router + ) { } + + ngOnInit() { + this.response = {name: '', cuisine: ''}; + this._route.params.subscribe((params: Params) => { + // console.log("inside editInit with params id", params['id']); + let observable = this._httpService.editRestaurant(params['id']); + observable.subscribe(data => { + // console.log("edit restaurant subscribe to Observable", data.json()); + data = data.json(); + // console.log("Data from this thisRestaurant", data['this_restaurant']); + this.thisRestaurant = { + id: params['id'], + name: data['this_restaurant'].name, + cuisine: data['this_restaurant'].cuisine + }; + }); + }); + } + + onSubmitEdit(event){ + event.preventDefault(); + // console.log("Inside onSubmitEdit function with thisRestaurant", this.thisRestaurant); + // code to send off the form data (this.thisRestaurant) to the service + let observable = this._httpService.updateRestaurant(this.thisRestaurant); + observable.subscribe((data:any) => { + data = data.json(); + // console.log("thisRestaurant subscribe to Observable", data); + if (data.message){ + this.response = data.message.errors; + // console.log(this.response, "response"); + } + else{ + // then reset this.thisRestaurant to new, clean object. + this.thisRestaurant = {id: '', name: '', cuisine: '' }; + this._router.navigate(['']); + } + }) + } +} \ No newline at end of file diff --git a/kyla_stearns/Angular/restaurants/client/src/app/home/home.component.css b/kyla_stearns/Angular/restaurants/client/src/app/home/home.component.css new file mode 100755 index 0000000..a3060db --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/home/home.component.css @@ -0,0 +1,43 @@ +#errors{ + color: red; + padding: 5px; + margin: 10px 0px 10px 0px; +} + +h4{ + margin-top: 10px; +} + +p{ + font-size: 18px; + margin: 15px 0px 15px 0px; +} + +table{ + font-size: 18px; + margin-top: 15px; +} + +thead{ + background-color: lightgrey; +} + +th{ + padding: 2px 5px 2px 5px; +} + +#new{ + width: 200px; + background-color: orange; +} + +button{ + width: 100px; + font-size: 14px; + padding: 5px; + text-align: center; + background-color: lightgrey; + vertical-align: top; + margin: 0px 15px 0px 15px; + border-radius: 5px; +} \ No newline at end of file diff --git a/kyla_stearns/Angular/restaurants/client/src/app/home/home.component.html b/kyla_stearns/Angular/restaurants/client/src/app/home/home.component.html new file mode 100755 index 0000000..0d73aff --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/home/home.component.html @@ -0,0 +1,24 @@ +
+

{{ response }}

+
+ + + + + + + + + + + + + + + + +
Restaurant Cuisine Actions Available
{{ element.name }} {{ element.cuisine }} + + + +
\ No newline at end of file diff --git a/kyla_stearns/Angular/restaurants/client/src/app/home/home.component.spec.ts b/kyla_stearns/Angular/restaurants/client/src/app/home/home.component.spec.ts new file mode 100755 index 0000000..490e81b --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/home/home.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { HomeComponent } from './home.component'; + +describe('HomeComponent', () => { + let component: HomeComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ HomeComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(HomeComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/kyla_stearns/Angular/restaurants/client/src/app/home/home.component.ts b/kyla_stearns/Angular/restaurants/client/src/app/home/home.component.ts new file mode 100755 index 0000000..d287d09 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/home/home.component.ts @@ -0,0 +1,45 @@ +import { Component, OnInit } from '@angular/core'; +import { HttpService } from '../http.service'; +import { ActivatedRoute, Params, Router } from '@angular/router'; + +@Component({ + selector: 'app-home', + templateUrl: './home.component.html', + styleUrls: ['./home.component.css'] +}) +export class HomeComponent implements OnInit { + restaurants = []; + response: any; + constructor( + private _httpService: HttpService, + private _route: ActivatedRoute, + private _router: Router + ) { } + + ngOnInit() { + this.getRestaurants(); + } + + getRestaurants(){ + let observable = this._httpService.getAllRestaurants(); + observable.subscribe(data => { // subscribe to Observable in order to get updates when you receive a response + data = data.json(); + // console.log("Got our restaurants!", data); // inject HttpService as dependency + // console.log( "This is all_restaurants of data", data['all_restaurants']); + this.restaurants = data['all_restaurants']; + }); + } + + deleteRestaurant(id){ + // console.log("inside component delete with id", id); + let observable = this._httpService.deleteRestaurant(id); + observable.subscribe(data => { // subscribe to Observable in order to get updates when you receive a response + // console.log("deleteRestaurant subscribe to Observable", data.json()); + this.response = data.json(); // inject HttpService as dependency + this._router.navigate(['/home']); + // location.reload(); + // this.getRestaurants(); + }); + } + +} diff --git a/kyla_stearns/Angular/restaurants/client/src/app/http.service.spec.ts b/kyla_stearns/Angular/restaurants/client/src/app/http.service.spec.ts new file mode 100755 index 0000000..c2eb030 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/http.service.spec.ts @@ -0,0 +1,15 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { HttpService } from './http.service'; + +describe('HttpService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [HttpService] + }); + }); + + it('should be created', inject([HttpService], (service: HttpService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/kyla_stearns/Angular/restaurants/client/src/app/http.service.ts b/kyla_stearns/Angular/restaurants/client/src/app/http.service.ts new file mode 100755 index 0000000..516ba58 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/http.service.ts @@ -0,0 +1,50 @@ +import { Injectable } from '@angular/core'; +import { Http } from '@angular/http'; + +@Injectable() +export class HttpService { + + constructor(private _http: Http) { } + + getAllRestaurants(){ + // console.log("Inside getAllRestaurants function"); + return this._http.get('/restaurants'); + } + + createRestaurant(newRestaurant){ + // console.log("Inside createRestaurant function with newRestaurant", newRestaurant); + return this._http.post('/restaurants/new', newRestaurant); + } + + editRestaurant(id){ + // console.log("Inside editRestaurant function with id", id); + return this._http.get('/restaurants/edit/'+id); + } + + updateRestaurant(editRestaurant){ + // console.log("Inside updateRestaurant function with editRestaurant", editRestaurant); + return this._http.patch('/restaurants/update/'+editRestaurant.id, editRestaurant); + } + + deleteRestaurant(id){ + // console.log("Inside deleteRestaurant function with id", id); + return this._http.delete('/restaurants/'+id); + } + + getAllReviews(id){ + // console.log("Inside getAllReviews function", id); + return this._http.get('/reviews/'+id); + } + + getName(id){ + // console.log("Inside getAllReviews function", id); + return this._http.get('/name/'+id); + } + + createReview(newReview){ + // console.log("Inside createReview function with newReview", newReview); + return this._http.post('/review/'+newReview._restaurant, newReview); + } + +} + diff --git a/kyla_stearns/Angular/restaurants/client/src/app/new-restaurant/new-restaurant.component.css b/kyla_stearns/Angular/restaurants/client/src/app/new-restaurant/new-restaurant.component.css new file mode 100755 index 0000000..83c2ec1 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/new-restaurant/new-restaurant.component.css @@ -0,0 +1,49 @@ +#errors{ + color: red; + padding: 5px; + margin: 10px 0px 10px 0px; +} + +h4{ + margin-top: 10px; +} + +p{ + font-size: 18px; + margin: 15px 0px 15px 0px; +} + +label{ + display: block; + margin: 10px 0px 10px 0px; +} + +input[type=text]{ + display: block; + padding: 5px; + font-size: 14px; + margin-left: 15px; + width: 225px; +} + +input[type=submit]{ + width: 100px; + font-size: 14px; + padding: 5px; + text-align: center; + background-color: #4EBEFB; + vertical-align: top; + margin: 15px 15px 0px 15px; + border-radius: 5px; +} + +button{ + width: 100px; + font-size: 14px; + padding: 5px; + text-align: center; + background-color: lightgrey; + vertical-align: top; + margin: 15px 15px 0px 15px; + border-radius: 5px; +} \ No newline at end of file diff --git a/kyla_stearns/Angular/restaurants/client/src/app/new-restaurant/new-restaurant.component.html b/kyla_stearns/Angular/restaurants/client/src/app/new-restaurant/new-restaurant.component.html new file mode 100755 index 0000000..5580646 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/new-restaurant/new-restaurant.component.html @@ -0,0 +1,24 @@ +
+

{{ response.name.message }}

+

{{ response.cuisine.message }}

+
+ +

Register a restaurant:

+ +
+ + + + + + + + + +
\ No newline at end of file diff --git a/kyla_stearns/Angular/restaurants/client/src/app/new-restaurant/new-restaurant.component.spec.ts b/kyla_stearns/Angular/restaurants/client/src/app/new-restaurant/new-restaurant.component.spec.ts new file mode 100755 index 0000000..4e3e229 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/new-restaurant/new-restaurant.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NewRestaurantComponent } from './new-restaurant.component'; + +describe('NewRestaurantComponent', () => { + let component: NewRestaurantComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ NewRestaurantComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(NewRestaurantComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/kyla_stearns/Angular/restaurants/client/src/app/new-restaurant/new-restaurant.component.ts b/kyla_stearns/Angular/restaurants/client/src/app/new-restaurant/new-restaurant.component.ts new file mode 100755 index 0000000..89fd542 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/new-restaurant/new-restaurant.component.ts @@ -0,0 +1,51 @@ +import { Component, OnInit } from '@angular/core'; +import { HttpService } from '../http.service'; +import { ActivatedRoute, Params, Router } from '@angular/router'; + +@Component({ + selector: 'app-new-restaurant', + templateUrl: './new-restaurant.component.html', + styleUrls: ['./new-restaurant.component.css'] +}) +export class NewRestaurantComponent implements OnInit { + newRestaurant = {}; + response: any; + constructor( + private _httpService: HttpService, + private _route: ActivatedRoute, + private _router: Router + ) { } + + ngOnInit() { + this.response = {name: '', cuisine: '', errmsg: ''}; + this.newRestaurant = { name: '', cuisine: '' }; + } + + onSubmitNew(event){ + // CODE TO SUBMIT FORM AND SEND TO DB + event.preventDefault(); + this.response = {name: '', cuisine: '', errmsg: ''}; + // code to send off the form data (this.newRestaurant) to the service + let observable = this._httpService.createRestaurant(this.newRestaurant); + observable.subscribe((data:any) => { + data = data.json(); + // console.log("newRestaurant subscribe to Observable", data); + if(data.message){ + if(data.message.errors){ + // console.log("error submitting new restaurant", data.message.errors); + this.response = data.message.errors; + // console.log(this.response, "response"); + } + else{ + // console.log("UNIQUE error submitting new restaurant", data.message.errmsg); + this.response.name = {message: "This restaurant has already been registered."} + } + } + else{ + // console.log("Getting inside else to navigate home"); + this.newRestaurant = { name: '', cuisine: '' }; + this._router.navigate(['/home']); + } + }); + } +} \ No newline at end of file diff --git a/kyla_stearns/Angular/restaurants/client/src/app/new-review/new-review.component.css b/kyla_stearns/Angular/restaurants/client/src/app/new-review/new-review.component.css new file mode 100755 index 0000000..4240ec4 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/new-review/new-review.component.css @@ -0,0 +1,58 @@ +#errors{ + color: red; + padding: 5px; + margin: 10px 0px 10px 0px; +} + +h4{ + margin-top: 10px; +} + +p{ + font-size: 18px; + margin: 15px 0px 15px 0px; +} + +label{ + display: block; + margin: 10px 0px 10px 0px; +} + +option{ + display: block; + padding: 15px; + font-size: 14px; + margin-left: 25px; + width: 150px; +} + +input{ + display: block; + padding: 5px; + font-size: 14px; + margin-left: 15px; + width: 225px; +} + +input[type=submit]{ + display: inline; + width: 100px; + font-size: 14px; + padding: 5px; + text-align: center; + background-color: #4EBEFB; + vertical-align: top; + margin: 15px 15px 0px 15px; + border-radius: 5px; +} + +button{ + width: 100px; + font-size: 14px; + padding: 5px; + text-align: center; + background-color: lightgrey; + vertical-align: top; + margin: 15px 15px 0px 15px; + border-radius: 5px; +} \ No newline at end of file diff --git a/kyla_stearns/Angular/restaurants/client/src/app/new-review/new-review.component.html b/kyla_stearns/Angular/restaurants/client/src/app/new-review/new-review.component.html new file mode 100755 index 0000000..893cea3 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/new-review/new-review.component.html @@ -0,0 +1,31 @@ +
+

{{ response.name.message }}

+

{{ response.content.message }}

+
+ +

Write a review for {{ currentRestaurant }}:

+ +
+ + + + + + + + + + + +
\ No newline at end of file diff --git a/kyla_stearns/Angular/restaurants/client/src/app/new-review/new-review.component.spec.ts b/kyla_stearns/Angular/restaurants/client/src/app/new-review/new-review.component.spec.ts new file mode 100755 index 0000000..eb1609b --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/new-review/new-review.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NewReviewComponent } from './new-review.component'; + +describe('NewReviewComponent', () => { + let component: NewReviewComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ NewReviewComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(NewReviewComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/kyla_stearns/Angular/restaurants/client/src/app/new-review/new-review.component.ts b/kyla_stearns/Angular/restaurants/client/src/app/new-review/new-review.component.ts new file mode 100755 index 0000000..0e6e333 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/new-review/new-review.component.ts @@ -0,0 +1,66 @@ +import { Component, OnInit } from '@angular/core'; +import { HttpService } from '../http.service'; +import { ActivatedRoute, Params, Router } from '@angular/router'; + +@Component({ + selector: 'app-new-review', + templateUrl: './new-review.component.html', + styleUrls: ['./new-review.component.css'] +}) +export class NewReviewComponent implements OnInit { + newReview = {}; + response: any; + currentRestaurant: any; + constructor( + private _httpService: HttpService, + private _route: ActivatedRoute, + private _router: Router + ) { } + + ngOnInit() { + this._route.params.subscribe((params: Params) => { + // console.log("inside NEW reviewInit with params id", params['id']); + this.response = {name: '', content: ''}; + this.newReview = { + _restaurant: params['id'], + name: '', + rank: 1, + content: '' + }; + let observable = this._httpService.getName(params['id']); + observable.subscribe(data => { // subscribe to Observable in order to get updates when you receive a response + data = data.json(); + // console.log("this is the current restaurant name", data['restaurant_name']); + this.currentRestaurant = data['restaurant_name']; + }); + }); + } + + onSubmitNew(event){ + // CODE TO SUBMIT FORM AND SEND TO DB + event.preventDefault(); + // code to send off the form data (this.newReview) to the service + // console.log("Updated newReview", this.newReview); + let observable = this._httpService.createReview(this.newReview); + observable.subscribe((data:any) => { + data = data.json(); + // console.log("newReview subscribe to Observable", data); + if(data.message){ + this.response = data.message.errors; + // console.log(this.response, "response"); + } + else{ + // then reset this.newReview to new, clean object. + // console.log(this.newReview._restaurant, "this.newReview"); + this._router.navigate(['/reviews/'+this.newReview._restaurant]); + this.newReview = { + _restaurant: '', + name: '', + rank: 1, + content: '' + }; + } + }) + } + +} diff --git a/kyla_stearns/Angular/restaurants/client/src/app/review/review.component.css b/kyla_stearns/Angular/restaurants/client/src/app/review/review.component.css new file mode 100755 index 0000000..d38a57d --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/review/review.component.css @@ -0,0 +1,38 @@ +#errors{ + color: red; + padding: 5px; + margin: 10px 0px 10px 0px; +} + +h4{ + margin-top: 10px; +} + +p{ + font-size: 18px; + margin: 15px 0px 15px 0px; +} + +table{ + font-size: 18px; + margin-top: 15px; +} + +thead{ + background-color: lightgrey; +} + +th{ + padding: 2px 5px 2px 5px; +} + +button{ + width: 200px; + font-size: 14px; + padding: 5px; + text-align: center; + background-color: orange; + vertical-align: top; + margin: 0px 15px 0px 15px; + border-radius: 5px; +} \ No newline at end of file diff --git a/kyla_stearns/Angular/restaurants/client/src/app/review/review.component.html b/kyla_stearns/Angular/restaurants/client/src/app/review/review.component.html new file mode 100755 index 0000000..de6128c --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/review/review.component.html @@ -0,0 +1,24 @@ +
+

{{ response }}

+
+ +

Reviews for {{ currentRestaurant }}

+ + + + + + + + + + + + + + + + + + +
Customer Stars Description Actions
{{ element.name }} {{ element.rank }} {{ element.content }}
\ No newline at end of file diff --git a/kyla_stearns/Angular/restaurants/client/src/app/review/review.component.spec.ts b/kyla_stearns/Angular/restaurants/client/src/app/review/review.component.spec.ts new file mode 100755 index 0000000..41f37ab --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/review/review.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ReviewComponent } from './review.component'; + +describe('ReviewComponent', () => { + let component: ReviewComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ReviewComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ReviewComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/kyla_stearns/Angular/restaurants/client/src/app/review/review.component.ts b/kyla_stearns/Angular/restaurants/client/src/app/review/review.component.ts new file mode 100755 index 0000000..05b326d --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/app/review/review.component.ts @@ -0,0 +1,37 @@ +import { Component, OnInit } from '@angular/core'; +import { HttpService } from '../http.service'; +import { ActivatedRoute, Params, Router } from '@angular/router'; + +@Component({ + selector: 'app-review', + templateUrl: './review.component.html', + styleUrls: ['./review.component.css'] +}) +export class ReviewComponent implements OnInit { + reviews = []; + restaurantID: any; + currentRestaurant: any; + response: any; + constructor( + private _httpService: HttpService, + private _route: ActivatedRoute, + private _router: Router + ) { } + + ngOnInit() { + this._route.params.subscribe((params: Params) => { + this.restaurantID = params['id']; + // console.log("inside reviewInit with params id", params['id']); + let observable = this._httpService.getAllReviews(params['id']); + observable.subscribe(data => { // subscribe to Observable in order to get updates when you receive a response + data = data.json(); + // console.log("Got our reviews!", data); // inject HttpService as dependency + // console.log( "This is all_reviews of data", data['all_reviews']); + // console.log("this is the current restaurant name", data['restaurant_name']); + this.currentRestaurant = data['restaurant_name']; + this.reviews = data['all_reviews']; + }); + }); + } + +} diff --git a/kyla_stearns/Angular/restaurants/client/src/assets/.gitkeep b/kyla_stearns/Angular/restaurants/client/src/assets/.gitkeep new file mode 100755 index 0000000..e69de29 diff --git a/kyla_stearns/Angular/restaurants/client/src/assets/forkspoon.png b/kyla_stearns/Angular/restaurants/client/src/assets/forkspoon.png new file mode 100755 index 0000000..ff5cc08 Binary files /dev/null and b/kyla_stearns/Angular/restaurants/client/src/assets/forkspoon.png differ diff --git a/kyla_stearns/Angular/restaurants/client/src/environments/environment.prod.ts b/kyla_stearns/Angular/restaurants/client/src/environments/environment.prod.ts new file mode 100755 index 0000000..3612073 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/environments/environment.prod.ts @@ -0,0 +1,3 @@ +export const environment = { + production: true +}; diff --git a/kyla_stearns/Angular/restaurants/client/src/environments/environment.ts b/kyla_stearns/Angular/restaurants/client/src/environments/environment.ts new file mode 100755 index 0000000..b7f639a --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/environments/environment.ts @@ -0,0 +1,8 @@ +// The file contents for the current environment will overwrite these during build. +// The build system defaults to the dev environment which uses `environment.ts`, but if you do +// `ng build --env=prod` then `environment.prod.ts` will be used instead. +// The list of which env maps to which file can be found in `.angular-cli.json`. + +export const environment = { + production: false +}; diff --git a/kyla_stearns/Angular/restaurants/client/src/favicon.ico b/kyla_stearns/Angular/restaurants/client/src/favicon.ico new file mode 100755 index 0000000..8081c7c Binary files /dev/null and b/kyla_stearns/Angular/restaurants/client/src/favicon.ico differ diff --git a/kyla_stearns/Angular/restaurants/client/src/favicon.png b/kyla_stearns/Angular/restaurants/client/src/favicon.png new file mode 100755 index 0000000..ff5cc08 Binary files /dev/null and b/kyla_stearns/Angular/restaurants/client/src/favicon.png differ diff --git a/kyla_stearns/Angular/restaurants/client/src/index.html b/kyla_stearns/Angular/restaurants/client/src/index.html new file mode 100755 index 0000000..9c7791a --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/index.html @@ -0,0 +1,14 @@ + + + + + Restaurants + + + + + + + + + diff --git a/kyla_stearns/Angular/restaurants/client/src/main.ts b/kyla_stearns/Angular/restaurants/client/src/main.ts new file mode 100755 index 0000000..91ec6da --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/main.ts @@ -0,0 +1,12 @@ +import { enableProdMode } from '@angular/core'; +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + +import { AppModule } from './app/app.module'; +import { environment } from './environments/environment'; + +if (environment.production) { + enableProdMode(); +} + +platformBrowserDynamic().bootstrapModule(AppModule) + .catch(err => console.log(err)); diff --git a/kyla_stearns/Angular/restaurants/client/src/polyfills.ts b/kyla_stearns/Angular/restaurants/client/src/polyfills.ts new file mode 100755 index 0000000..af84770 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/polyfills.ts @@ -0,0 +1,79 @@ +/** + * This file includes polyfills needed by Angular and is loaded before the app. + * You can add your own extra polyfills to this file. + * + * This file is divided into 2 sections: + * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. + * 2. Application imports. Files imported after ZoneJS that should be loaded before your main + * file. + * + * The current setup is for so-called "evergreen" browsers; the last versions of browsers that + * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), + * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. + * + * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html + */ + +/*************************************************************************************************** + * BROWSER POLYFILLS + */ + +/** IE9, IE10 and IE11 requires all of the following polyfills. **/ +// import 'core-js/es6/symbol'; +// import 'core-js/es6/object'; +// import 'core-js/es6/function'; +// import 'core-js/es6/parse-int'; +// import 'core-js/es6/parse-float'; +// import 'core-js/es6/number'; +// import 'core-js/es6/math'; +// import 'core-js/es6/string'; +// import 'core-js/es6/date'; +// import 'core-js/es6/array'; +// import 'core-js/es6/regexp'; +// import 'core-js/es6/map'; +// import 'core-js/es6/weak-map'; +// import 'core-js/es6/set'; + +/** IE10 and IE11 requires the following for NgClass support on SVG elements */ +// import 'classlist.js'; // Run `npm install --save classlist.js`. + +/** IE10 and IE11 requires the following for the Reflect API. */ +// import 'core-js/es6/reflect'; + + +/** Evergreen browsers require these. **/ +// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove. +import 'core-js/es7/reflect'; + + +/** + * Required to support Web Animations `@angular/platform-browser/animations`. + * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation + **/ +// import 'web-animations-js'; // Run `npm install --save web-animations-js`. + +/** + * By default, zone.js will patch all possible macroTask and DomEvents + * user can disable parts of macroTask/DomEvents patch by setting following flags + */ + + // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame + // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick + // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames + + /* + * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js + * with the following flag, it will bypass `zone.js` patch for IE/Edge + */ +// (window as any).__Zone_enable_cross_context_check = true; + +/*************************************************************************************************** + * Zone JS is required by default for Angular itself. + */ +import 'zone.js/dist/zone'; // Included with Angular CLI. + + + +/*************************************************************************************************** + * APPLICATION IMPORTS + */ diff --git a/kyla_stearns/Angular/restaurants/client/src/styles.css b/kyla_stearns/Angular/restaurants/client/src/styles.css new file mode 100755 index 0000000..90d4ee0 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/styles.css @@ -0,0 +1 @@ +/* You can add global styles to this file, and also import other style files */ diff --git a/kyla_stearns/Angular/restaurants/client/src/test.ts b/kyla_stearns/Angular/restaurants/client/src/test.ts new file mode 100755 index 0000000..1631789 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/test.ts @@ -0,0 +1,20 @@ +// This file is required by karma.conf.js and loads recursively all the .spec and framework files + +import 'zone.js/dist/zone-testing'; +import { getTestBed } from '@angular/core/testing'; +import { + BrowserDynamicTestingModule, + platformBrowserDynamicTesting +} from '@angular/platform-browser-dynamic/testing'; + +declare const require: any; + +// First, initialize the Angular testing environment. +getTestBed().initTestEnvironment( + BrowserDynamicTestingModule, + platformBrowserDynamicTesting() +); +// Then we find all the tests. +const context = require.context('./', true, /\.spec\.ts$/); +// And load the modules. +context.keys().map(context); diff --git a/kyla_stearns/Angular/restaurants/client/src/tsconfig.app.json b/kyla_stearns/Angular/restaurants/client/src/tsconfig.app.json new file mode 100755 index 0000000..39ba8db --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/tsconfig.app.json @@ -0,0 +1,13 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/app", + "baseUrl": "./", + "module": "es2015", + "types": [] + }, + "exclude": [ + "test.ts", + "**/*.spec.ts" + ] +} diff --git a/kyla_stearns/Angular/restaurants/client/src/tsconfig.spec.json b/kyla_stearns/Angular/restaurants/client/src/tsconfig.spec.json new file mode 100755 index 0000000..ac22a29 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/tsconfig.spec.json @@ -0,0 +1,19 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/spec", + "baseUrl": "./", + "module": "commonjs", + "types": [ + "jasmine", + "node" + ] + }, + "files": [ + "test.ts" + ], + "include": [ + "**/*.spec.ts", + "**/*.d.ts" + ] +} diff --git a/kyla_stearns/Angular/restaurants/client/src/typings.d.ts b/kyla_stearns/Angular/restaurants/client/src/typings.d.ts new file mode 100755 index 0000000..ef5c7bd --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/src/typings.d.ts @@ -0,0 +1,5 @@ +/* SystemJS module definition */ +declare var module: NodeModule; +interface NodeModule { + id: string; +} diff --git a/kyla_stearns/Angular/restaurants/client/tsconfig.json b/kyla_stearns/Angular/restaurants/client/tsconfig.json new file mode 100755 index 0000000..a6c016b --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist/out-tsc", + "sourceMap": true, + "declaration": false, + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "target": "es5", + "typeRoots": [ + "node_modules/@types" + ], + "lib": [ + "es2017", + "dom" + ] + } +} diff --git a/kyla_stearns/Angular/restaurants/client/tslint.json b/kyla_stearns/Angular/restaurants/client/tslint.json new file mode 100755 index 0000000..9963d6c --- /dev/null +++ b/kyla_stearns/Angular/restaurants/client/tslint.json @@ -0,0 +1,143 @@ +{ + "rulesDirectory": [ + "node_modules/codelyzer" + ], + "rules": { + "arrow-return-shorthand": true, + "callable-types": true, + "class-name": true, + "comment-format": [ + true, + "check-space" + ], + "curly": true, + "deprecation": { + "severity": "warn" + }, + "eofline": true, + "forin": true, + "import-blacklist": [ + true, + "rxjs", + "rxjs/Rx" + ], + "import-spacing": true, + "indent": [ + true, + "spaces" + ], + "interface-over-type-literal": true, + "label-position": true, + "max-line-length": [ + true, + 140 + ], + "member-access": false, + "member-ordering": [ + true, + { + "order": [ + "static-field", + "instance-field", + "static-method", + "instance-method" + ] + } + ], + "no-arg": true, + "no-bitwise": true, + "no-console": [ + true, + "debug", + "info", + "time", + "timeEnd", + "trace" + ], + "no-construct": true, + "no-debugger": true, + "no-duplicate-super": true, + "no-empty": false, + "no-empty-interface": true, + "no-eval": true, + "no-inferrable-types": [ + true, + "ignore-params" + ], + "no-misused-new": true, + "no-non-null-assertion": true, + "no-shadowed-variable": true, + "no-string-literal": false, + "no-string-throw": true, + "no-switch-case-fall-through": true, + "no-trailing-whitespace": true, + "no-unnecessary-initializer": true, + "no-unused-expression": true, + "no-use-before-declare": true, + "no-var-keyword": true, + "object-literal-sort-keys": false, + "one-line": [ + true, + "check-open-brace", + "check-catch", + "check-else", + "check-whitespace" + ], + "prefer-const": true, + "quotemark": [ + true, + "single" + ], + "radix": true, + "semicolon": [ + true, + "always" + ], + "triple-equals": [ + true, + "allow-null-check" + ], + "typedef-whitespace": [ + true, + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + } + ], + "unified-signatures": true, + "variable-name": false, + "whitespace": [ + true, + "check-branch", + "check-decl", + "check-operator", + "check-separator", + "check-type" + ], + "directive-selector": [ + true, + "attribute", + "app", + "camelCase" + ], + "component-selector": [ + true, + "element", + "app", + "kebab-case" + ], + "no-output-on-prefix": true, + "use-input-property-decorator": true, + "use-output-property-decorator": true, + "use-host-property-decorator": true, + "no-input-rename": true, + "no-output-rename": true, + "use-life-cycle-interface": true, + "use-pipe-transform-interface": true, + "component-class-suffix": true, + "directive-class-suffix": true + } +} diff --git a/kyla_stearns/Angular/restaurants/package.json b/kyla_stearns/Angular/restaurants/package.json new file mode 100755 index 0000000..179671b --- /dev/null +++ b/kyla_stearns/Angular/restaurants/package.json @@ -0,0 +1,20 @@ +{ + "name": "restaurants", + "version": "1.0.0", + "description": "", + "main": "server.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "start": "node server.js" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "body-parser": "^1.18.2", + "express": "^4.16.3", + "mongoose": "^5.0.11", + "mongoose-unique-validator": "^2.0.0", + "path": "^0.12.7" + } +} diff --git a/kyla_stearns/Angular/restaurants/server.js b/kyla_stearns/Angular/restaurants/server.js new file mode 100755 index 0000000..4866ac3 --- /dev/null +++ b/kyla_stearns/Angular/restaurants/server.js @@ -0,0 +1,216 @@ +let express = require('express'); + app = express(); + bodyParser = require('body-parser'); + mongoose = require('mongoose'); + path = require('path'); + uniqueValidator = require('mongoose-unique-validator'); + Schema = mongoose.Schema; + RestaurantsSchema = new mongoose.Schema({ + name: { + type: String, + unique: [true, "Restaurant already in database."], + required: [true, "Please enter a restaurant name."], + minlength: [3, "Name must be at least 3 characters."] + }, + cuisine: { + type: String, + required: [true, "Please enter a cuisine."], + min: [3, "Cuisine must be at least 3 characters."] + }, + reviews: [{ + type: Schema.Types.ObjectId, ref: 'Review' + }], + }, {timestamps: true}); + ReviewsSchema = new mongoose.Schema({ + _restaurant: { + type: Schema.Types.ObjectId, ref: 'Restaurant'}, + name: { + type: String, + required: [true, "Please enter your name."], + minlength: [3, "Name must be at least 3 characters."] + }, + rank: { + type: Number, + required: [true, "Please give your star rank."], + min: [1, "Minimum rank is 1."], + max: [5, "Maximum rank is 5."] + }, + content: { + type: String, + required: [true, "Please enter a review."], + min: [3, "Review must be at least 3 characters."] + }, + }, {timestamps: true}); + +app.use(bodyParser.json()); +app.use(express.static( __dirname + '/client/dist')); + +mongoose.connect('mongodb://localhost/restaurants'); // CHANGE TO MATCH DB NAME +mongoose.Promise = global.Promise; +mongoose.model('Restaurant', RestaurantsSchema); +mongoose.model('Review', ReviewsSchema); +let Restaurant = mongoose.model('Restaurant'); + Review = mongoose.model('Review'); + + +app.get('/restaurants', (req,res) => { + // GET ALL RESTAURANTS + Restaurant.find({}).populate('reviews').exec((err, all_restaurants) => { + if(err){ + // console.log("There's an error finding all restaurants", err); + res.json({message: err}); + // res.status(400).json(err); + } + else{ + // console.log("Successfully retrieved restaurants", all_restaurants); + res.json({all_restaurants: all_restaurants}); + } + }); +}); + +app.post('/restaurants/new', (req,res) => { + // CREATE A NEW RESTAURANT + // console.log("Inside POST new restaurant with form data", req.body); + let new_restaurant = new Restaurant({name: req.body.name, cuisine: req.body.cuisine}); + new_restaurant.save((err) => { + if(err){ + // console.log("There's an error creating a new restaurant.", err); + res.json({message: err}); + // res.status(400).json(err); + } + else{ + // console.log("Successfully created new restaurant", new_restaurant); + res.json({new_restaurant: new_restaurant}); + } + }); +}); + +app.get('/restaurants/edit/:id', (req,res) => { + // GET SPECIFIC RESTAURANT BY ID -- best to use findOne so you don't have more than 1 + Restaurant.findOne({_id: req.params.id}, (err, this_restaurant) => { + if(err){ + // console.log("There's an error getting this restaurant.", err); + res.json({message: err}); + // res.status(400).json(err); + } + else{ + // console.log("Successfully retrieved this restaurant", this_restaurant); + res.json({this_restaurant: this_restaurant}); + } + }); +}); + +app.patch('/restaurants/update/:id', (req,res) => { + // UPDATE SPECIFIC RESTAURANT BY ID + console.log("Inside server .put to update restaurant", req.body); + Restaurant.update( + {_id: req.params.id}, + {name: req.body.name, cuisine: req.body.cuisine}, + {runValidators: true}, + (err, this_restaurant) => { + if(err){ + // console.log("There's an error updating this restaurant", err.message); + res.json({message: err}); + // res.status(400).json(err); + } + else{ + // console.log("Successfully updated this restaurant", this_restaurant); + res.json("Successfully updated this restaurant"); + } + }); +}); + +app.get('/reviews/:id', (req,res) => { + // GET SPECIFIC RESTAURANT BY ID -- best to use findOne so you don't have more than 1 + // console.log("INSIDE SERVER GET ALL REVIEWS", req.params.id); + Restaurant.findOne({_id: req.params.id}, (err, this_restaurant) => { + if(err){ + // console.log("There's an error getting this restaurant.", err); + res.json({message: err}); + // res.status(400).json(err); + } + else{ + // SORT HERE -- MAKE SURE TO SORT THEN EXECUTE THE CALLBACK W/ ERRORS ETC + Review.find({_restaurant: req.params.id}).sort({rank: -1}).exec( (err, all_reviews) => { + if(err){ + // console.log("There's an error getting all reviews.", err); + res.json({message: err}); + // res.status(400).json(err); + } + else{ + // console.log("Successfully retrieved all reviews", all_reviews, this_restaurant); + res.json({all_reviews: all_reviews, restaurant_name: this_restaurant.name}); + } + }); + } + }); +}); + +app.get('/name/:id', (req,res) => { + // GET SPECIFIC RESTAURANT BY ID -- best to use findOne so you don't have more than 1 + // console.log("INSIDE SERVER GET ALL REST NAME", req.params.id); + Restaurant.findOne({_id: req.params.id}, (err, this_restaurant) => { + if(err){ + // console.log("There's an error getting this restaurant.", err); + res.json({message: err}); + // res.status(400).json(err); + } + else{ + // console.log("Successfully retrieved this restaurant", this_restaurant); + res.json({restaurant_name: this_restaurant.name}); + } + }); +}); + +app.post('/review/:id', (req,res) => { + Restaurant.findOne({_id: req.params.id}, (err, this_restaurant) => { + // console.log(req.body); + let review = new Review({name: req.body.name, rank: req.body.rank, content: req.body.content}); + // console.log(review); + review._restaurant = this_restaurant._id; + review.save((err) => { + if(err) { + // console.log('Errors saving review.', err.message); + res.json({message: err}); + } + else { + this_restaurant.reviews.push(review); + // console.log(this_restaurant.reviews); + this_restaurant.save((err) => { + if(err){ + // console.log('Errors saving restaurant.'); + res.json({message: err}); + } + else{ + res.json({this_restaurant: this_restaurant}); + } + }); + } + }); + }); +}); + +app.delete('/restaurants/:id', (req,res) => { + // DELETE SPECIFIC RESTAURANT BY ID + // console.log("Inside the DELETE function", req.params.id); + Restaurant.remove({_id: req.params.id}, (err) => { + // if there is an error, console.log that something went wrong + if(err){ + // console.log("There's an error deleting this restaurant.", err); + res.json(err.message); + // res.status(400).json(err); + } + else{ + console.log("Successfully deleted this restaurant."); + // res.json("You have successfully deleted this restaurant!"); + } + }); +}); + +app.all("*", (req, res, next) => { + res.sendFile(path.resolve("./client/dist/index.html")); +}); + +app.listen(5678, () => { + console.log('Listening on port 5678'); +}) \ No newline at end of file diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/.angular-cli.json b/kyla_stearns/Angular/restfulAPI/helloAngular/.angular-cli.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/.editorconfig b/kyla_stearns/Angular/restfulAPI/helloAngular/.editorconfig old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/.gitignore b/kyla_stearns/Angular/restfulAPI/helloAngular/.gitignore old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/README.md b/kyla_stearns/Angular/restfulAPI/helloAngular/README.md old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/e2e/app.e2e-spec.ts b/kyla_stearns/Angular/restfulAPI/helloAngular/e2e/app.e2e-spec.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/e2e/app.po.ts b/kyla_stearns/Angular/restfulAPI/helloAngular/e2e/app.po.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/e2e/tsconfig.e2e.json b/kyla_stearns/Angular/restfulAPI/helloAngular/e2e/tsconfig.e2e.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/karma.conf.js b/kyla_stearns/Angular/restfulAPI/helloAngular/karma.conf.js old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/package.json b/kyla_stearns/Angular/restfulAPI/helloAngular/package.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/protractor.conf.js b/kyla_stearns/Angular/restfulAPI/helloAngular/protractor.conf.js old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/src/app/app.component.css b/kyla_stearns/Angular/restfulAPI/helloAngular/src/app/app.component.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/src/app/app.component.html b/kyla_stearns/Angular/restfulAPI/helloAngular/src/app/app.component.html old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/src/app/app.component.spec.ts b/kyla_stearns/Angular/restfulAPI/helloAngular/src/app/app.component.spec.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/src/app/app.component.ts b/kyla_stearns/Angular/restfulAPI/helloAngular/src/app/app.component.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/src/app/app.module.ts b/kyla_stearns/Angular/restfulAPI/helloAngular/src/app/app.module.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/src/app/http.service.spec.ts b/kyla_stearns/Angular/restfulAPI/helloAngular/src/app/http.service.spec.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/src/app/http.service.ts b/kyla_stearns/Angular/restfulAPI/helloAngular/src/app/http.service.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/src/assets/.gitkeep b/kyla_stearns/Angular/restfulAPI/helloAngular/src/assets/.gitkeep old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/src/environments/environment.prod.ts b/kyla_stearns/Angular/restfulAPI/helloAngular/src/environments/environment.prod.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/src/environments/environment.ts b/kyla_stearns/Angular/restfulAPI/helloAngular/src/environments/environment.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/src/favicon.ico b/kyla_stearns/Angular/restfulAPI/helloAngular/src/favicon.ico old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/src/index.html b/kyla_stearns/Angular/restfulAPI/helloAngular/src/index.html old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/src/main.ts b/kyla_stearns/Angular/restfulAPI/helloAngular/src/main.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/src/polyfills.ts b/kyla_stearns/Angular/restfulAPI/helloAngular/src/polyfills.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/src/styles.css b/kyla_stearns/Angular/restfulAPI/helloAngular/src/styles.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/src/test.ts b/kyla_stearns/Angular/restfulAPI/helloAngular/src/test.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/src/tsconfig.app.json b/kyla_stearns/Angular/restfulAPI/helloAngular/src/tsconfig.app.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/src/tsconfig.spec.json b/kyla_stearns/Angular/restfulAPI/helloAngular/src/tsconfig.spec.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/src/typings.d.ts b/kyla_stearns/Angular/restfulAPI/helloAngular/src/typings.d.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/tsconfig.json b/kyla_stearns/Angular/restfulAPI/helloAngular/tsconfig.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/helloAngular/tslint.json b/kyla_stearns/Angular/restfulAPI/helloAngular/tslint.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/package.json b/kyla_stearns/Angular/restfulAPI/package.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/restfulAPI/server.js b/kyla_stearns/Angular/restfulAPI/server.js old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/.angular-cli.json b/kyla_stearns/Angular/shinto/.angular-cli.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/.editorconfig b/kyla_stearns/Angular/shinto/.editorconfig old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/.gitignore b/kyla_stearns/Angular/shinto/.gitignore old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/README.md b/kyla_stearns/Angular/shinto/README.md old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/e2e/app.e2e-spec.ts b/kyla_stearns/Angular/shinto/e2e/app.e2e-spec.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/e2e/app.po.ts b/kyla_stearns/Angular/shinto/e2e/app.po.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/e2e/tsconfig.e2e.json b/kyla_stearns/Angular/shinto/e2e/tsconfig.e2e.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/karma.conf.js b/kyla_stearns/Angular/shinto/karma.conf.js old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/package.json b/kyla_stearns/Angular/shinto/package.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/protractor.conf.js b/kyla_stearns/Angular/shinto/protractor.conf.js old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/app-routing.module.ts b/kyla_stearns/Angular/shinto/src/app/app-routing.module.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/app.component.css b/kyla_stearns/Angular/shinto/src/app/app.component.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/app.component.html b/kyla_stearns/Angular/shinto/src/app/app.component.html old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/app.component.spec.ts b/kyla_stearns/Angular/shinto/src/app/app.component.spec.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/app.component.ts b/kyla_stearns/Angular/shinto/src/app/app.component.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/app.module.ts b/kyla_stearns/Angular/shinto/src/app/app.module.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/buy/buy.component.css b/kyla_stearns/Angular/shinto/src/app/buy/buy.component.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/buy/buy.component.html b/kyla_stearns/Angular/shinto/src/app/buy/buy.component.html old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/buy/buy.component.spec.ts b/kyla_stearns/Angular/shinto/src/app/buy/buy.component.spec.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/buy/buy.component.ts b/kyla_stearns/Angular/shinto/src/app/buy/buy.component.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/buy/buy.service.spec.ts b/kyla_stearns/Angular/shinto/src/app/buy/buy.service.spec.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/buy/buy.service.ts b/kyla_stearns/Angular/shinto/src/app/buy/buy.service.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/home/home.component.css b/kyla_stearns/Angular/shinto/src/app/home/home.component.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/home/home.component.html b/kyla_stearns/Angular/shinto/src/app/home/home.component.html old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/home/home.component.spec.ts b/kyla_stearns/Angular/shinto/src/app/home/home.component.spec.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/home/home.component.ts b/kyla_stearns/Angular/shinto/src/app/home/home.component.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/http.service.spec.ts b/kyla_stearns/Angular/shinto/src/app/http.service.spec.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/http.service.ts b/kyla_stearns/Angular/shinto/src/app/http.service.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/ledger/ledger.component.css b/kyla_stearns/Angular/shinto/src/app/ledger/ledger.component.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/ledger/ledger.component.html b/kyla_stearns/Angular/shinto/src/app/ledger/ledger.component.html old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/ledger/ledger.component.spec.ts b/kyla_stearns/Angular/shinto/src/app/ledger/ledger.component.spec.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/ledger/ledger.component.ts b/kyla_stearns/Angular/shinto/src/app/ledger/ledger.component.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/mine/mine.component.css b/kyla_stearns/Angular/shinto/src/app/mine/mine.component.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/mine/mine.component.html b/kyla_stearns/Angular/shinto/src/app/mine/mine.component.html old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/mine/mine.component.spec.ts b/kyla_stearns/Angular/shinto/src/app/mine/mine.component.spec.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/mine/mine.component.ts b/kyla_stearns/Angular/shinto/src/app/mine/mine.component.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/sell/sell.component.css b/kyla_stearns/Angular/shinto/src/app/sell/sell.component.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/sell/sell.component.html b/kyla_stearns/Angular/shinto/src/app/sell/sell.component.html old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/sell/sell.component.spec.ts b/kyla_stearns/Angular/shinto/src/app/sell/sell.component.spec.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/sell/sell.component.ts b/kyla_stearns/Angular/shinto/src/app/sell/sell.component.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/sell/sell.service.spec.ts b/kyla_stearns/Angular/shinto/src/app/sell/sell.service.spec.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/sell/sell.service.ts b/kyla_stearns/Angular/shinto/src/app/sell/sell.service.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/transaction/transaction.component.css b/kyla_stearns/Angular/shinto/src/app/transaction/transaction.component.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/transaction/transaction.component.html b/kyla_stearns/Angular/shinto/src/app/transaction/transaction.component.html old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/transaction/transaction.component.spec.ts b/kyla_stearns/Angular/shinto/src/app/transaction/transaction.component.spec.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/app/transaction/transaction.component.ts b/kyla_stearns/Angular/shinto/src/app/transaction/transaction.component.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/assets/.gitkeep b/kyla_stearns/Angular/shinto/src/assets/.gitkeep old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/assets/coin.png b/kyla_stearns/Angular/shinto/src/assets/coin.png old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/environments/environment.prod.ts b/kyla_stearns/Angular/shinto/src/environments/environment.prod.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/environments/environment.ts b/kyla_stearns/Angular/shinto/src/environments/environment.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/favicon.ico b/kyla_stearns/Angular/shinto/src/favicon.ico old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/favicon.png b/kyla_stearns/Angular/shinto/src/favicon.png old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/index.html b/kyla_stearns/Angular/shinto/src/index.html old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/main.ts b/kyla_stearns/Angular/shinto/src/main.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/polyfills.ts b/kyla_stearns/Angular/shinto/src/polyfills.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/styles.css b/kyla_stearns/Angular/shinto/src/styles.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/test.ts b/kyla_stearns/Angular/shinto/src/test.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/tsconfig.app.json b/kyla_stearns/Angular/shinto/src/tsconfig.app.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/tsconfig.spec.json b/kyla_stearns/Angular/shinto/src/tsconfig.spec.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/src/typings.d.ts b/kyla_stearns/Angular/shinto/src/typings.d.ts old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/tsconfig.json b/kyla_stearns/Angular/shinto/tsconfig.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Angular/shinto/tslint.json b/kyla_stearns/Angular/shinto/tslint.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Express/coolCatsChat/notes.txt b/kyla_stearns/Express/coolCatsChat/notes.txt old mode 100644 new mode 100755 diff --git a/kyla_stearns/Express/coolCatsChat/package.json b/kyla_stearns/Express/coolCatsChat/package.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Express/coolCatsChat/server.js b/kyla_stearns/Express/coolCatsChat/server.js old mode 100644 new mode 100755 diff --git a/kyla_stearns/Express/coolCatsChat/static/css/chat.css b/kyla_stearns/Express/coolCatsChat/static/css/chat.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/Express/coolCatsChat/static/images/coolCatsClub.jpg b/kyla_stearns/Express/coolCatsChat/static/images/coolCatsClub.jpg old mode 100644 new mode 100755 diff --git a/kyla_stearns/Express/coolCatsChat/static/js/chat.js b/kyla_stearns/Express/coolCatsChat/static/js/chat.js old mode 100644 new mode 100755 diff --git a/kyla_stearns/Express/coolCatsChat/views/chat.ejs b/kyla_stearns/Express/coolCatsChat/views/chat.ejs old mode 100644 new mode 100755 diff --git a/kyla_stearns/Express/coolCatsChat/views/index.ejs b/kyla_stearns/Express/coolCatsChat/views/index.ejs old mode 100644 new mode 100755 diff --git a/kyla_stearns/Express/epicButtonGame/package.json b/kyla_stearns/Express/epicButtonGame/package.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Express/epicButtonGame/server.js b/kyla_stearns/Express/epicButtonGame/server.js old mode 100644 new mode 100755 diff --git a/kyla_stearns/Express/epicButtonGame/static/css/button.css b/kyla_stearns/Express/epicButtonGame/static/css/button.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/Express/epicButtonGame/static/js/button.js b/kyla_stearns/Express/epicButtonGame/static/js/button.js old mode 100644 new mode 100755 diff --git a/kyla_stearns/Express/epicButtonGame/views/index.ejs b/kyla_stearns/Express/epicButtonGame/views/index.ejs old mode 100644 new mode 100755 diff --git a/kyla_stearns/Express/groupChat/package.json b/kyla_stearns/Express/groupChat/package.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Express/groupChat/server.js b/kyla_stearns/Express/groupChat/server.js old mode 100644 new mode 100755 diff --git a/kyla_stearns/Express/groupChat/static/css/chat.css b/kyla_stearns/Express/groupChat/static/css/chat.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/Express/groupChat/static/js/chat.js b/kyla_stearns/Express/groupChat/static/js/chat.js old mode 100644 new mode 100755 diff --git a/kyla_stearns/Express/groupChat/views/index.ejs b/kyla_stearns/Express/groupChat/views/index.ejs old mode 100644 new mode 100755 diff --git a/kyla_stearns/Express/surveyRe/package.json b/kyla_stearns/Express/surveyRe/package.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Express/surveyRe/server.js b/kyla_stearns/Express/surveyRe/server.js old mode 100644 new mode 100755 diff --git a/kyla_stearns/Express/surveyRe/static/css/sockets.css b/kyla_stearns/Express/surveyRe/static/css/sockets.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/Express/surveyRe/static/js/sockets.js b/kyla_stearns/Express/surveyRe/static/js/sockets.js old mode 100644 new mode 100755 diff --git a/kyla_stearns/Express/surveyRe/views/index.ejs b/kyla_stearns/Express/surveyRe/views/index.ejs old mode 100644 new mode 100755 diff --git a/kyla_stearns/JavaScript/GOT/css/got.css b/kyla_stearns/JavaScript/GOT/css/got.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/JavaScript/GOT/got.txt b/kyla_stearns/JavaScript/GOT/got.txt old mode 100644 new mode 100755 diff --git a/kyla_stearns/JavaScript/GOT/html/got.html b/kyla_stearns/JavaScript/GOT/html/got.html old mode 100644 new mode 100755 diff --git a/kyla_stearns/JavaScript/GOT/images/baratheon.png b/kyla_stearns/JavaScript/GOT/images/baratheon.png old mode 100644 new mode 100755 diff --git a/kyla_stearns/JavaScript/GOT/images/lannister.jpg b/kyla_stearns/JavaScript/GOT/images/lannister.jpg old mode 100644 new mode 100755 diff --git a/kyla_stearns/JavaScript/GOT/images/stark.jpg b/kyla_stearns/JavaScript/GOT/images/stark.jpg old mode 100644 new mode 100755 diff --git a/kyla_stearns/JavaScript/GOT/images/targaryen.jpg b/kyla_stearns/JavaScript/GOT/images/targaryen.jpg old mode 100644 new mode 100755 diff --git a/kyla_stearns/JavaScript/GOT/js/got.js b/kyla_stearns/JavaScript/GOT/js/got.js old mode 100644 new mode 100755 diff --git a/kyla_stearns/Mongo/LoginReg/package.json b/kyla_stearns/Mongo/LoginReg/package.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Mongo/LoginReg/server.js b/kyla_stearns/Mongo/LoginReg/server.js old mode 100644 new mode 100755 diff --git a/kyla_stearns/Mongo/LoginReg/static/css/loginReg.css b/kyla_stearns/Mongo/LoginReg/static/css/loginReg.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/Mongo/LoginReg/views/loginReg.ejs b/kyla_stearns/Mongo/LoginReg/views/loginReg.ejs old mode 100644 new mode 100755 diff --git a/kyla_stearns/Mongo/LoginReg/views/success.ejs b/kyla_stearns/Mongo/LoginReg/views/success.ejs old mode 100644 new mode 100755 diff --git a/kyla_stearns/Mongo/messageBoard/package.json b/kyla_stearns/Mongo/messageBoard/package.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Mongo/messageBoard/server.js b/kyla_stearns/Mongo/messageBoard/server.js old mode 100644 new mode 100755 diff --git a/kyla_stearns/Mongo/messageBoard/static/css/messageBoard.css b/kyla_stearns/Mongo/messageBoard/static/css/messageBoard.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/Mongo/messageBoard/views/wall.ejs b/kyla_stearns/Mongo/messageBoard/views/wall.ejs old mode 100644 new mode 100755 diff --git a/kyla_stearns/Mongo/mongooseDashboard/package.json b/kyla_stearns/Mongo/mongooseDashboard/package.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Mongo/mongooseDashboard/server.js b/kyla_stearns/Mongo/mongooseDashboard/server.js old mode 100644 new mode 100755 diff --git a/kyla_stearns/Mongo/mongooseDashboard/static/css/animals.css b/kyla_stearns/Mongo/mongooseDashboard/static/css/animals.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/Mongo/mongooseDashboard/views/animals.ejs b/kyla_stearns/Mongo/mongooseDashboard/views/animals.ejs old mode 100644 new mode 100755 diff --git a/kyla_stearns/Mongo/mongooseDashboard/views/index.ejs b/kyla_stearns/Mongo/mongooseDashboard/views/index.ejs old mode 100644 new mode 100755 diff --git a/kyla_stearns/Mongo/mongooseDashboard/views/new.ejs b/kyla_stearns/Mongo/mongooseDashboard/views/new.ejs old mode 100644 new mode 100755 diff --git a/kyla_stearns/Mongo/mongooseDashboard/views/show.ejs b/kyla_stearns/Mongo/mongooseDashboard/views/show.ejs old mode 100644 new mode 100755 diff --git a/kyla_stearns/Mongo/quotingDojo/package.json b/kyla_stearns/Mongo/quotingDojo/package.json old mode 100644 new mode 100755 diff --git a/kyla_stearns/Mongo/quotingDojo/server.js b/kyla_stearns/Mongo/quotingDojo/server.js old mode 100644 new mode 100755 diff --git a/kyla_stearns/Mongo/quotingDojo/static/css/quotes.css b/kyla_stearns/Mongo/quotingDojo/static/css/quotes.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/Mongo/quotingDojo/views/index.ejs b/kyla_stearns/Mongo/quotingDojo/views/index.ejs old mode 100644 new mode 100755 diff --git a/kyla_stearns/Mongo/quotingDojo/views/quotes.ejs b/kyla_stearns/Mongo/quotingDojo/views/quotes.ejs old mode 100644 new mode 100755 diff --git a/kyla_stearns/Node/cars_and_cats/css/catsCars.css b/kyla_stearns/Node/cars_and_cats/css/catsCars.css old mode 100644 new mode 100755 diff --git a/kyla_stearns/Node/cars_and_cats/images/adorbsCar.jpg b/kyla_stearns/Node/cars_and_cats/images/adorbsCar.jpg old mode 100644 new mode 100755 diff --git a/kyla_stearns/Node/cars_and_cats/images/bahHumbug.jpg b/kyla_stearns/Node/cars_and_cats/images/bahHumbug.jpg old mode 100644 new mode 100755 diff --git a/kyla_stearns/Node/cars_and_cats/images/crossCat.jpg b/kyla_stearns/Node/cars_and_cats/images/crossCat.jpg old mode 100644 new mode 100755 diff --git a/kyla_stearns/Node/cars_and_cats/images/na.jpg b/kyla_stearns/Node/cars_and_cats/images/na.jpg old mode 100644 new mode 100755 diff --git a/kyla_stearns/Node/cars_and_cats/images/poetCar.jpg b/kyla_stearns/Node/cars_and_cats/images/poetCar.jpg old mode 100644 new mode 100755 diff --git a/kyla_stearns/Node/cars_and_cats/images/sideEyeCar.jpg b/kyla_stearns/Node/cars_and_cats/images/sideEyeCar.jpg old mode 100644 new mode 100755 diff --git a/kyla_stearns/Node/cars_and_cats/images/smallIsBig.jpeg b/kyla_stearns/Node/cars_and_cats/images/smallIsBig.jpeg old mode 100644 new mode 100755 diff --git a/kyla_stearns/Node/cars_and_cats/images/thugLifeCat.jpg b/kyla_stearns/Node/cars_and_cats/images/thugLifeCat.jpg old mode 100644 new mode 100755 diff --git a/kyla_stearns/Node/cars_and_cats/server.js b/kyla_stearns/Node/cars_and_cats/server.js old mode 100644 new mode 100755 diff --git a/kyla_stearns/Node/cars_and_cats/views/cars.html b/kyla_stearns/Node/cars_and_cats/views/cars.html old mode 100644 new mode 100755 diff --git a/kyla_stearns/Node/cars_and_cats/views/cats.html b/kyla_stearns/Node/cars_and_cats/views/cats.html old mode 100644 new mode 100755 diff --git a/kyla_stearns/Node/cars_and_cats/views/newCar.html b/kyla_stearns/Node/cars_and_cats/views/newCar.html old mode 100644 new mode 100755 diff --git a/matt_tucker/algorithms/flood_fill.js b/matt_tucker/algorithms/flood_fill.js old mode 100644 new mode 100755 diff --git a/matt_tucker/express/default-server.js b/matt_tucker/express/default-server.js old mode 100644 new mode 100755 diff --git a/matt_tucker/placeholder.txt b/matt_tucker/placeholder.txt old mode 100644 new mode 100755 diff --git a/wittrock/.gitignore b/wittrock/.gitignore old mode 100644 new mode 100755 diff --git a/wittrock/README.md b/wittrock/README.md old mode 100644 new mode 100755 diff --git a/wittrock/dom_1.html b/wittrock/dom_1.html old mode 100644 new mode 100755 diff --git a/wittrock/dom_2.html b/wittrock/dom_2.html old mode 100644 new mode 100755 diff --git a/wittrock/hoisting_js.txt b/wittrock/hoisting_js.txt old mode 100644 new mode 100755 diff --git a/wittrock/js_intermediate.js b/wittrock/js_intermediate.js old mode 100644 new mode 100755 diff --git a/wittrock/js_math.js b/wittrock/js_math.js old mode 100644 new mode 100755 diff --git a/wittrock/js_objects.js b/wittrock/js_objects.js old mode 100644 new mode 100755 diff --git a/wittrock/js_scroll.html b/wittrock/js_scroll.html old mode 100644 new mode 100755 diff --git a/wittrock/js_scroll.js b/wittrock/js_scroll.js old mode 100644 new mode 100755 diff --git a/wittrock/jsbasics1.txt b/wittrock/jsbasics1.txt old mode 100644 new mode 100755 diff --git a/wittrock/jsbasics2.txt b/wittrock/jsbasics2.txt old mode 100644 new mode 100755 diff --git a/wittrock/ninja_class.js b/wittrock/ninja_class.js old mode 100644 new mode 100755 diff --git a/wittrock/ninja_class3.js b/wittrock/ninja_class3.js old mode 100644 new mode 100755 diff --git a/wittrock/nins_class2.js b/wittrock/nins_class2.js old mode 100644 new mode 100755 diff --git a/wittrock/oop_practice.js b/wittrock/oop_practice.js old mode 100644 new mode 100755