I have a simple node server that had been running and handling requests smoothly until I came home for the holidays. Now, it appears to be loading, but does not respond to POST/GET requests. By this I mean that when I start my server (through calling node app.js) the console prints out that the server is listening on the specific port, and when I visit http://localhost:8000/, I see "hello" in response. However, when I try to make requests to my server via Postman or through an XMLHTTPRequest (things that worked smoothly before I moved locations), I get an error.
Is there something wrong with my code? Is it possible that my wifi and connection at home is different from my workspace?
See the important code in my server below:
var express = require('express');
var app = express();
var bodyParser = require('body-parser');
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({
extended: true
}));
app.get('/', function(req,res){
res.send("hello");
})
app.listen(8000, function () {
console.log('App listening on port 8000!');
});
thank you very much!