Changeset 459 for Dev/trunk/src/server/server.js
- Timestamp:
- 06/10/13 00:59:05 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/src/server/server.js
r452 r459 2 2 var fs = require("fs"); 3 3 var https = require("https"); 4 var os = require("os"); 4 5 var path = require("path"); 5 6 var proxy = require("simple-http-proxy"); … … 30 31 app.use('/data/couch', proxy('http://localhost:5984/qed')); 31 32 32 var server = https.createServer(httpsOptions, app).listen(8443); 33 var server = https.createServer(httpsOptions, app) 34 server.listen(8443); 33 35 34 console.log("Listening on https://localhost:8443/"); 36 console.log( 37 "Listening on " + 38 _.chain(os.networkInterfaces()) 39 .map(function(value,key){ return value; }) 40 .flatten() 41 .filter(function(intf){ return intf.family === "IPv4" && !intf.internal; }) 42 .reduce(function(urls, intf){ return urls+', http://'+intf.address+':8443/'; }, "http://127.0.0.1:8443/") 43 .value() + ".");
Note: See TracChangeset
for help on using the changeset viewer.