Basic Node and Express -

I got an error doing this first challenge Modify the myApp.js file to log “Hello World” to the console:
Screen Shot 2022-01-11 at 00.00.27

Hey @army93, welcome to the forum.

It’s pretty hard to help you without seeing your code, can you please share that as well?

Also, did you make sure that the project is running, and you are submitting the live working URL?

Hope this helps :slight_smile:

My code in myApp.js is:
var express = require(‘express’);

var app = express();

console.log(“Hello World”);

And I ensure the project is running.

Hey @army93, can you please make sure that there’s
module.exports = app;

At the very end of your myApp.js file. It’s very important that it stays there untouched.
It should have been there by default when cloning the starter project.

With that, I don’t see why it should not work.

Also you can always share your link, so other people can help you better by looking at the whole project :slight_smile:

Hope this helps.

1 Like

Thanks again for your help. I made sure module.exports = app is there.
It’s running on Console but live link shows “not found”

Oh that one! :slight_smile:

That’s normal, you haven’t implemented any route in your server (yet!), so it’s responding with nothing :slight_smile:

But if you see the console, you should see the log successfully.

You should be good to go with your challenge, remember to submit the live url, so not the one in your browser, but the one in the window, like in the below example.

Hope it helps :slight_smile:

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