xxxxxxxxxx
I got the same problem which occurred by running the php -S 127.0.0.1:8000 in
the wrong directory.
Project/src/ -> caused the error
Project/src/public -> Solved
xxxxxxxxxx
const express = require('express');
const app = express();
// Define routes and application logic...
// 404 error handler
app.use((req, res, next) => {
res.status(404).send('404 - Resource Not Found');
});
// Other application setup and listening to a port
app.listen(3000, () => {
console.log('Server is running on port 3000.');
});