Skip to content

alonp99/Oath-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Oath-Server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published