Q: Yeoman MEAN application access refused When running my application through Grunt serve on another machine although the application loads, the information from Mongo and node do not load:
Error message
Here is my server code:
//Loading requiriments
var express = require('express');
var mongoose = require('mongoose');
var bodyParser = require('body-parser');
var methodOverride = require('method-override');
var _ = require('lodash');




// Starting application

var app = express();

//  Middleware for REST API

app.use(bodyParser.urlencoded({
  extended: true
}));
app.use(bodyParser.json());
app.use(methodOverride('X-HTTP-Method-Override'));

// CORS (cross domain refference) Support

app.use(function(req, res, next) {
  res.header('Access-Control-Allow-Origin', '*');
  res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE');
  res.header('Access-Control-Allow-Headers', 'Content-Type');
  next();
});

app.use('/hello', function(req, res, next) {

  res.send('Hello Robin');
})

// connecting to MongoDB

mongoose.connect('mongodb://localhost/tvapp');
mongoose.connection.once('open', function() {

  // Load models

  app.models = require('./models/index');

  // Load the routes.
  var routes = require('./routes');
  _.each(routes, function(controller, route) {
    app.use(route, controller(app, route));
  });

  //log server action

  console.log('Listening to port 3000');

  // Listen on port defined
  app.listen(3000, '127.0.0.1');
});

Does anyone have any idea on what I might have done wrong?
I am using yeoman as well, would that be an issue?
Also, on my machine works fine, it won't work on outside machines which have access to the application and the server separately however the application won't run the server

A: The IP host address you are using is localhost, i.e., 127.0.0.1. This IP is only available to the computer it is running on. For other computers to access your server, you will have to use another IP host. If it is on the same local network, you can use your LAN IP. If not, you will have to use your public IP. How you go about finding your LAN or public IP address will depend on your operating system.
