The documentation for Diet.js demonstrates a basic web server as:
var server = require('diet');
var app = server();
app.listen('http://localhost:8000');
app.get('/', function ($) {
$.end('Hello World!');
});
The above code snippet only listens to localhost on port 8000. However, If I would want the server to listen to requests with domain as localhost as well as the ip-address (and probably even the machine name), is there a way to do it? I think there isn't, at least as per the developer's documentation but it would be great if someone could point to me a decent hack of some sort.