Answer the question
In order to leave comments, you need to log in
How to connect to Node web server?
var express = require('express');
var app = express();
app.use(express.static('public'));
app.listen('3000',function () {
console.log("Express server is up on port 3000!");
});
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ReactApp</title>
</head>
<body>
<h4>Hello world!</h4>
</body>
</html>
Cannot GET /
GET localhost:3000 404 (Not Found)
Answer the question
In order to leave comments, you need to log in
404 is an error code from the server side. It means that you have successfully connected to it, but the server cannot find what you are looking for.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question