OneRandomMikey / MI-449-SS17-740-js-serving-content-with-express-OctGcX

0 stars 0 forks source link

Project Feedback #1

Open OneRandomMikey opened 7 years ago

OneRandomMikey commented 7 years ago

Make a fansite based on something you like (sandwiches, movies, emo bands, etc.)

@egillespie Can you take a look at this? It's hosted here and meets the following criteria:

egillespie commented 7 years ago

Hi @OneRandomMikey, I don't see your website on Heroku. Did you push it?

While you're at it, can you find a way to create one template that can be used for your /ember, /riki, and /weaver routes? Furthermore, update server.js to use a forEach to generate those routes! It might look something like this:

Object.keys(heros).forEach(function (id) {
  var hero = heros[id]
  app.get(hero.link, function (request, response) {
    response.render('pages/hero', {
      heros: heros,
      hero: hero
    })
  })
})

After you’ve made your changes and pushed them to GitHub and your hosted site, give it a once-over to make sure it looks right, then comment back here and I’ll take another look.

Thanks! 🐉

OneRandomMikey commented 7 years ago

I made changes.

egillespie commented 7 years ago

Hi @OneRandomMikey, this looks really good. All three of your hero templates look identical. Can you remove two of them and rename the third to hero.ejs and reuse it for all of your hero pages?

Try it out and let me know when you want me to take a look! ⛳️

OneRandomMikey commented 7 years ago

I am not understand what exactly you want me to do. Do you want me to only have two ejs files, one for home page and another one for all three heros?

KatieMFritz commented 7 years ago

Jumping in so you can get un-stuck. Yes, you'll only have two views. hero.ejs will be used for all three heroes.

You might find these parts of the lesson helpful:

KatieMFritz commented 7 years ago

If you want more help, try sending Erik a Slack message. He'll probably see it sooner! 🚀

OneRandomMikey commented 7 years ago

Made changes.

egillespie commented 7 years ago

Nailed it! 🔨 :shipit: