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'
]
}
Type | Mean (ms) |
---|---|
Bare Node | 47 |
Express | 110 |
Quiver HTTP Handler | 125 |
Quiver Simple Handler | 182 |