rocketpack.io
v0.0.2
Published
Javascript Client for Rocket Pack Services
Downloads
6
Maintainers
Readme
rocketpack-javascript
Javascript Client for Rocket Pack Cloud Services
Installation
$ npm install rocketpack.io --save
Initialization
import rocketpack from 'rocketpack.io'
rocketpack.init({ key: 'YOUR-PROJECT-KEY' })
Data Services
const peopleCollection = rocketpack.dataService().collection('people')
let peopleItems = peopleCollection.find()
Authentication Services
const auth = rocketpack.authService()
// register a user
function registerUser(username, password, metadata) {
auth.register({
username: username,
password: password,
claims: Object.keys(obj).map((key) => ({name: key, value: obj[key]})
})
}