Created
April 16, 2013 22:52
-
-
Save allenpc/5400348 to your computer and use it in GitHub Desktop.
Generate a unique server ID in Node.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// From https://github.com/marcello3d/node-buffalo/blob/master/lib/objectid.js | |
var machineHash = crypto.createHash('md5').update(os.hostname()).digest('binary'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment