Skip to content

wdi-atx-12/emergency-compliment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Emergency Compliment

Mission…

Create your own version of Emergency Compliment, using Express. When a user visits the site, they should be greeted with a WDI-themed compliment to cheer them up.

Part 1: Compliment Me

When you visit the root ("/") of your app, it should display a generic greeting and a randomly chosen compliment.

Here are some sample compliments but feel free to substitute in your own:

compliments = [
  "Your instructors love you",
  "High five = ^5",
  "Chris thinks you\'re wicked smart!",
  "Britney Jo is sooo proud of you! :)",
  "Nicole would totally hire you.",
  "It\'s almost beer o\'clock!",
  "You\'re a full-stack unicorn! 🦄"
]

HINT: Check this out on how to get a random thing from an array to use in the getRandomCompliments() function.

Part 2: Get Personal

When you visit "/name" (ie: "/randy"), the greeting should personalize itself to the provided name. There should still be a random compliment.

Challenge 1: Make it Pretty

When the user refreshes the page, the background color changes randomly. Here is an array of colors you can use if you'd like:

colors = ["#fd6c3b", "#4edacf","#65a576","#f2d83d"];

Challenge 2: More Compliments

Allow a user to add to the list of compliments using a POST request. You can submit POST requests to the app using a form.

You may want to use the body-parser package to automatically parse the form variables and present them as JS objects inside the res object.

Licensing

All content is licensed under a CC­BY­NC­SA 4.0 license. All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact [email protected].

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published