How can I get the server name for where node.js is running? -
i want add line point different database depending on server running node.js on (localhost vs test.com, etc). how server name in node.js? is, server side equivalent location.host?
var os = require('os'); os.hostname();
Comments
Post a Comment