Basic Node and Express - Start a Working Express Server - JV8uNYCLmswZOtDhAEcwu

Tell us what’s happening:
After failing to get a further step to verify (the env problem), I’ve restarted this module in a local enviorment rather than repl because well, I was at a loss.

The problem won’t verify. In the console on my localhost:3000 address I get this error

"GET http://localhost:3000/ 404 (Not Found)"

I’ve cloned the github repo, and imported express as it was necessary to get the local enviorment to boot up with node server.js

The only code I’ve edited so far in the project is in the myApp.js file and is here in it’s entirety:

let express = require('express');
let app = express();

app.get("/", function(req, res) {
    res.send("Hello Express");
  });


console.log("Hello world")

I’m not sure how to get this to verify, I can see the freecodecamp accessess in the terminal in vscode.

Your project link(s)

solution: http://localhost:3000

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.114 Safari/537.36 Edg/103.0.1264.49

Challenge: Basic Node and Express - Start a Working Express Server

Link to the challenge:

For anyone that finds this, I walked away came back and launched node server.js again it worked.

1 Like

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