Skip to content

evanx/redis-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

redis-app

Redis application archetype.

This provides lifecycle boilerplate reused across similar applications.

Usage

The index.js entry-point uses the redis-app application archetype.

require('redis-app')(
    require('../package'),
    require('./spec'),
    async redisApp => Object.assign(global, redisApp),
    () => require('./main')
).catch(err => {
    console.error(err);
});

where we extract the config from process.env according to the spec and invoke our main function.

In the above example, we assign the archetype's dependencies on global before main.js is parsed i.e. including:

    const redisApp = {
        assert, clc, lodash, Promise,
        asserta, asserto,
        DataError, StatusError, UrlStatusError,
        redis, client, logger, config,
        multiExecAsync
    };

Uses

Used by

Inter alia:


https://twitter.com/@evanxsummers

About

Redis application archetype.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published