rocketpack
v0.0.3
Published
Javascript SDK for Rocket Pack Services
Downloads
13
Maintainers
Readme
rocketpack-sdk-js
Javascript SDK for Rocket Pack Services
Quick Start
Installation
$ npm install rocketpack --save
Initialization
import rocketpack from 'rocketpack'
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]})
})
}
Thanks
Thanks a lot to @cpojer for his kindness for transfering the ownership of the rocketpack
npm package.