0.0.25 • Published 5 years ago
@jtviegas/store-loader-service v0.0.25
store loader service
a service that handles entities persistence from a cloud bucket into a store, reacting to the event triggered by the update of the bucket content
Installation
npm install @jtviegas/store-loader-service
Usage
required environment variables or configuration properties
- STORELOADERSERVICE_AWS_REGION
- STORELOADERSERVICE_AWS_ACCESS_KEY_ID
- STORELOADERSERVICE_AWS_ACCESS_KEY
- STORELOADERSERVICE_DATA_DESCRIPTOR_FILE
- for testing purposes: STORELOADERSERVICE_TEST: { bucket_endpoint: 'http://localhost:5000' , store_endpoint: 'http://localhost:8000' }
code snippet example
...
const config = {
STORELOADERSERVICE_AWS_REGION: 'eu-west-1'
, STORELOADERSERVICE_AWS_ACCESS_KEY_ID: process.env.ACCESS_KEY_ID
, STORELOADERSERVICE_AWS_ACCESS_KEY: process.env.ACCESS_KEY
, STORELOADERSERVICE_DATA_DESCRIPTOR_FILE: 'data.spec'
}
const service = require('@jtviegas/store-loader-service')(config);
...
service.load(app, entity, environment, bucket, callback);
Check the test folder in source tree.
Tests
npm test
Contributing
just help yourself and submit a pull request
0.0.25
5 years ago
0.0.24
5 years ago
0.0.23
5 years ago
0.0.22
5 years ago
0.0.21
5 years ago
0.0.20
5 years ago
0.0.19
5 years ago
0.0.18
5 years ago
0.0.17
5 years ago
0.0.16
5 years ago
0.0.15
5 years ago
0.0.14
5 years ago
0.0.13
5 years ago
0.0.12
5 years ago
0.0.11
5 years ago
0.0.10
5 years ago
0.0.9
5 years ago
0.0.8
5 years ago
0.0.7
5 years ago
0.0.6
5 years ago
0.0.5
5 years ago
0.0.4
5 years ago