var helloHandler = function(args, callback) {
callback(null, 'Hello World!')
}
exports.quiverComponents = [
{
name: 'demo hello handler',
type: 'simple handler',
inputType: 'void',
outputType: 'text',
handler: helloHandler
}
]
$ quiver-server . --config ./config.js --main \
'quiver file directory handler'
$ convert in.jpg -resize 200 out.jpg
{
name: 'demo resize image handler',
type: 'stream handler',
configOverride: {
commandArgsExtractor: imageResizeCommandArgsExtractor,
},
resultContentType: 'image/jpeg',
handler: 'quiver file convert command handler'
}
{
name: 'demo image thumbnail handler',
type: 'stream pipeline',
pipeline: [
'quiver file directory handler',
'demo resize image handler'
]
}
$ quiver-server . --config ./config.js --main \
'demo image thumbnail handler'
{
name: 'demo image thumbnail handler',
type: 'stream pipeline',
middlewares: [
'quiver memory cache filter'
],
pipeline: [
'quiver file directory handler',
'demo resize image handler'
]
}
$ quiver-command . --main 'demo resize image handler' \
< static/images/blue-hat.jpg > temp/out.jpg
$ quiver-server . --main 'demo resize image handler'
$ curl http://localhost:8080 -X POST \
--data-binary @static/images/blue-hat.jpg > temp/out.jpg