Tell us what’s happening:
Describe your issue in detail here.
Hello,
I didn’t have any trouble completing the challenges locally in the “Managing Packages with NPM” section, but in this section, nothing seems to be working. For instance, in this first challenge, “Meet the Node console,” I can see “Hello World” being printed to the console, but the freeCodeCamp web site doesn’t seem to be able to detect it.
This is what I see in the macOS Terminal window:
Js-MacBook-Pro:boilerplate-express jasu62$ npm start
> fcc-learn-node-with-express@0.1.0 start
> node server.js
Hello World
Node is listening on port 3000...
And this is what the FCC page shows when I use https://localhost:3000 :
// running tests
"Hello World" should be in the console
// tests completed
I don’t see any other messages in the console window, and the test fails. I’m likely overlooking some totally obvious setup steps, so please let me know!
Your code so far
var express = require('express');
var app = express();
// 1. Meet the Node console
console.log("Hello World");
/*
// 2. Start a Working Express Server
app.get("/", function(req, res) {
res.send("Hello Express");
});
*/
/*
// 3. Serve an HTML File
app.get("/", function(req, res) {
res.sendFile(__dirname + "/views/index.html");
});
*/
module.exports = app;
You can see here that I tried the second and third exercises, too, but to no avail. The second exercise directs us to put our code between the lines already included in the file, which are, in this code, the first two lines and the very last one, so I went back and moved my console.log() statement between them.
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:96.0) Gecko/20100101 Firefox/96.0
Challenge: Meet the Node console
Link to the challenge: