Open OneRandomMikey opened 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! 🐉
I made changes.
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! ⛳️
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?
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:
If you want more help, try sending Erik a Slack message. He'll probably see it sooner! 🚀
Made changes.
Nailed it! 🔨 :shipit:
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:
nav
,head
,header
, etc.)forEach
to create a set of links to other data pagesp
tags, headings inh1
-h6
, etc.)express.static
to create a folder for static assets (images, stylesheets, etc.).gitignore
file so thatnode_modules
and any other unnecessary files are not commited to GitHub