0.1.3 • Published 9 years ago
refind v0.1.3
refind
Web server for Redis data including Refile support.
Use case
We want to publish data stored in Redis, including JSON objects that have been externalised to BLOB storage by https://github.com/evanx/refile
Config
See lib/config.js
Docker
You can build as follows:
docker build -t refind https://github.com/evanx/refind.gitSee bin/test.sh https://github.com/evanx/refind/blob/master/bin/test.sh
Builds:
- isolated network
refind-network - isolated Redis instance named
refind-redis - this utility
evanx/refind
We populate our test keys:
populate() {
}We build a container image for this service:
docker build -t refind https://github.com/evanx/refind.gitWe interactively run the service on our test Redis container:
docker run --name refind-instance --rm -i \
--network=refind-network \
-e host=$redisHost \
-e pattern='*' \
refindImplementation
See lib/main.js
Appication archetype
Incidently lib/index.js uses the redis-koa-app-rpf application archetype.
require('redis-koa-app-rpf')(require('./spec'), require('./main'));where we extract the config from process.env according to the spec and invoke our main function.
See https://github.com/evanx/redis-koa-app-rpf.
This provides lifecycle boilerplate to reuse across similar applications.