os

oath-server

Oath - Universal Promises (Server)

Showing:

Popularity

Downloads/wk

2

Maintenance

No Maintenance Data Available

Package

Dependencies

0

Size (min+gzip)

0.4KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Oath

Example

Node.js\Express server:

app.get('/', function (req, res) {
    var oath = new Oath(http, req.originalUrl);
    var promise = new Promise(function(resolve, reject) {
        setTimeout(function(){
            resolve('PROMISE RESOLVED!');
        }, 6000);
    });
    oath.send(promise);
    console.log('Client connected')
    res.render('index', { title: 'Oath Example' });
});

Angular Client:

.controller('example', ['OathService', function (OathService) {
        var promises = OathService.fetchPromises();
        promises[0].then(function(res) {
            console.log('Promise resolved: ');
            console.log(res);
        })
    }]);

Installation

Usage

Tests

npm test

Contributing

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100