added the ability to listen at a specific ip

This commit is contained in:
Peter 'Pita' Martischka 2011-07-30 16:39:53 +01:00
parent a47b5ab458
commit 5306a88214
3 changed files with 9 additions and 2 deletions

View File

@ -254,8 +254,8 @@ async.waterfall([
});
//let the server listen
app.listen(settings.port);
console.log("Server is listening at port " + settings.port);
app.listen(settings.port, settings.ip);
console.log("Server is listening at " + settings.ip + ":" + settings.port);
//init socket.io and redirect all requests to the MessageHandler
var io = socketio.listen(app);

View File

@ -21,6 +21,11 @@
var fs = require("fs");
/**
* The IP ep-lite should listen to
*/
exports.ip = "0.0.0.0";
/**
* The Port ep-lite should listen to
*/

View File

@ -4,6 +4,8 @@
Please edit settings.json, not settings.json.template
*/
{
//Ip and port which etherpad should bind at
"ip": "0.0.0.0",
"port" : 9001,
//The Type of the database. You can choose between sqlite and mysql