PixelHosting NPM Integration
NPM Package Release
Free Image Hosting for Steem Projects
Hello Steem,
to make it easier for developers to integrate PixelHosting into their projects we provide a npm package called pixelhosting
.
You can find it at:
https://www.npmjs.com/package/pixelhosting
Install the packe by running npm install pixelhosting --save
Then you can use the libary like this:
let pixel = require('./lib');
let data = ""data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAU4AAAEG.....";
pixel.init({
api_key: "YOUR_API_KEY",
api_key_id: "YOUR_API_KEY_ID"
});
pixel.upload(data).then((result) => {
console.log(result);
});
The result
will be an json object like this one:



