If you are getting this error, it could be because you don't have a route defined for your get.
For example:
const express = require('express');
const app = express();
app.get('/people', function (req, res) {
res.send('hello');
})
app.listen(3000);
http://http://localhost:3000/people --> this works
http://http://localhost:3000 --> this will output Cannot GET / message.