Skip to content
This repository was archived by the owner on Jan 10, 2019. It is now read-only.
This repository was archived by the owner on Jan 10, 2019. It is now read-only.

add .open() method #29

@avetisk

Description

@avetisk

Something like in MongooseJS (please see examples given in the linked page):

// lib/thoonk.js
module.export = require('thoonk').createClient();
// config/dev.js
...
require('../lib/pubsub.js').open('localhost', '6379', 'dev');
...

// config/prod.js
...
require('../lib/pubsub.js').open('prod.server', '6379', 'prod');
...

And then, whenever we need thoonk, we can get it, fully ready just by requiring it:

// app.js
...
require('./config/' + process.env.NODE_ENV + '.js');

var thoonk = require('./lib/thoonk.js'); // ready-to-use!
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions