0.0.3 • Published 5 years ago

rocketpack v0.0.3

Weekly downloads
6
License
MIT
Repository
github
Last release
5 years ago

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.