vectogram
v0.0.1
Published
Image to SVG conversion server
Downloads
5
Readme
#vectogr.am
API to convert image url to SVG path over http.
##install
npm install vectogram
##how do I use this?
run a vectogram server instance
var Vectogram = require('vectogram');
var options = { port: 80, host: '127.0.0.1' };
var server = new Vectogram(options) //start up the server
now you can make http requests to this server.
Resource:
GET
http://127.0.0.1/url_to_image
parameter:
pathonly
(optional - defaults tofalse
)
values:
true
false
Example http client request:
var http = require('http');
var options = {
host: '127.0.0.1'
, port: 80
, path: '/v1/' + 'http://www.google.com/images/srpr/logo3w.png'
};
var request = http.get(options, function (res) {
var reply = '';
res.on('data', function (chunk) {
reply += chunk;
});
res.on('end', function () {
console.log(reply);
});
});
request.on('error', function (e) {
console.log('http client error:', e)
});