concava-adapter-json
v0.1.0
Published
ConCaVa adapter for authorization, metadata and storage using JSON files.
Readme
ConCaVa JSON adapter
ConCaVa adapter for authorization, metadata and storage using JSON files.
This adapter uses the simple JSON file store.
Requires ConCaVa v0.6+.
Install
npm install concava-adapter-jsonConfigure
A ConCaVa configuration example:
const path = require('path')
const adapter = require('concava-adapter-json')
module.exports = {
debug: true,
logFile: '/tmp/output.log',
logName: 'concava',
port: 3000,
payloadMaxSize: '512kb',
auth: {
enabled: true,
header: 'Authorization',
byToken: true,
method: adapter.auth,
file: path.resolve('./data/tokens.json'),
},
metadata: {
method: adapter.metadata,
file: path.resolve('./data/metadata.json'),
},
storage: {
method: adapter.storage,
path: path.resolve('./data/'),
},
}Data will be stored in the storage path using the following file format: store.{udid}.json.
License
This software is licensed under the MIT license.
© 2016 Kukua BV
