Basic Node and Express - Serve an HTML File

where is my code BROKEN? plz HEEELP

let express = require('express');
let app = express();
app.get("/", (req, res) => {
  res.send("Hello Express");
});

console.log("Hello World");

app.get("/", function(req, res) {
  res.sendFile(__dirname + "/views/index.html");
});


Challenge: Basic Node and Express - Serve an HTML File

Link to the challenge:

  • Read the note at the bottom of the challenge text.

  • Make sure you are still exporting app at the bottom of the file module.exports = app;

2 Likes

hii friends help me in step 93

here is my code
function buyWeapon() {
if (gold >= 30) {
gold -= 30;
currentWeapon++;
goldText.innerText = gold;
let newWeapon = weapons[currentWeapon].name;
text.innerText += "In your inventory you have: " + newWeapon + “.”;
inventory.push(newWeapon);

}
}

reply to this comment with the link to the challenge
format your code next time for 1 thing
illl help but this is NOT how you should present this…
even if you dont NEED HELP anymore… i repeat…
this is NOT how you should present this…
Format your code
link it to its challenge
clean up your post
and be clear and precise and specific about your problem
think about it… your asking a question cuz something is unclear… and your expecting a colleague to peer through your unclear explanation and parse your pathway then speak it back…
its your work your working on… for me to help you work… you need to have cared enough to make your work as EASY AS IS POSSIBLE 4 me to work it out with you

they dont make up these rules just to flex control

*Note: this constructive dose of criticism cost me 10 min of my time to CHARITABLY CARE ABOUT YOUR PROBLEM then you did about even making your post for help a legible expression of your issue.
Ask yourself as you benefit from marinating in this moment…
what did I get out of assessing and asserting quality help … to you…
answer nothing…
not being mean… just trying to spark an awareness & interest in gratitude

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.