0.0.9 • Published 7 years ago

internode v0.0.9

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

internode

init

In express's app.js, init internode with the express app and the domain base path on which to sync. internode will add /sync to the base path and try to send and recieve sync data on that path.

let express = require('express');
let app = express();
require('internode').InterNode.init(app, 'https://domain.com');

set(key: string, value: string, expire?: number)

Internode.set('john@gmail.com', 'John Doe', 3600000)

get(key: string)

InterNode.get('john@gmail.com')
--> 'John Doe'

aggregate(key: string, value: number, expire: number)

InterNode.aggregate('account_dollar_balance', 257, 3600000);
InterNode.aggregate('account_dollar_balance', 129, 3600000);

getAggregated(key: string)

InterNode.getAggregated('account_dollar_balance');
--> 386
0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago