1.0.3 • Published 6 years ago

keysrun v1.0.3

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

Keys.run

Keys.run is a blazing fast, dead simple key-value API.

Get started

Install the npm module using:

npm install keysrun --save

Save a get

const keys = require('keysrun')

keys.init('YOUR_API_KEY')

keys.set('highscore', 3000).then(_ => {
    console.log(`New high score is saved!`)
})

Get a get

const keys = require('keysrun')

keys.init('YOUR_API_KEY')

keys.get('highscore').then(highscore => {
    console.log(`The current highscore is ${highscore}`)
})

Scoping

Let's say your want to have different keys for your production environment and dev environment, but having the same.

All you have to do is keys.namespace('dev').

Example:

const keys = require('keysrun')

keys.init('YOUR_API_KEY')
keys.namespace('production')

// This will actually set the key 'production/highscore'
keys.get('highscore').then(highscore => {
    console.log(`The current highscore is ${highscore}`)
})
1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago