NodeJs version of monsterId library by Andreas Gohr
NodeJs implementation of monsterId PHP library. Create unique avatar based on a seed. It depends by node-gd, crypto and srand npm packages.
$ npm install monsterid
//Include monsterId and create an http Server.var monsterId = require'monsterid';var http = require'http';httpcreateServer// Create your seed.var seed = 'abcdefg';var avatar = seed;// use public method getAvatar to retrieve an image in binary format.reswriteHead200 'Content-type':'image/png';resendavatargetAvatar 'binary';listen'8088';
Thanks to Andreas Gohr for his job on the original library.