di2tpd
March 3, 2024, 4:59am
1
Tell us what’s happening:
this is my code for a simple hello world in basic node and express curriculum.
let express = require('express');
let app = express();
console.log('Hello World');
module.exports = app;
but it can’t pass. i don’t think i make a mistake in my code.
when i open a new terminal and run node myApp.js
it showing the Hello World.
anybody know how to fix this issue?
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0
Challenge Information:
Basic Node and Express - Meet the Node console
Where are you running the code?
Also, you should use the start script npm run start
di2tpd
March 5, 2024, 4:52pm
3
i run it in gitpod,sir… it’s already run
supposedly i only need to add the console.log('Hello World')
and copy paste my gitpod link,but i never succeed
di2tpd
March 5, 2024, 5:00pm
4
here’s link to solution Basic Node and Express - Meet the Node console - JavaScript - The freeCodeCamp Forum
quote from the author
Finally found the solution:
You have to stop the node server by entering Ctrl + C. Then a bash prompt appears, where you type npm start run
.
1 Like
system
Closed
September 4, 2024, 5:00am
5
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.