0.0.9 • Published 8 years ago

internode v0.0.9

Weekly downloads
1
License
MIT
Repository
github
Last release
8 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

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago