lolita
L changes the world.
Last updated 5 years ago by kchan .
ISC · Original npm · Tarball · package.json
$ cnpm install lolita 
SYNC missed versions from official npm registry.

lolita

L changes the world.

import L from 'lolita'

L.use('database', 'mongodb')
L.use('login_methods', ['local', 'weibo', 'twitter'])

L.config('mongodb', {
  'url': '...',
  'port': '...'
})

L.config('weibo', {
  'app_id': '...',
  'app_token': '...'
})

const Post = L.extend('Post')
const Comment = L.extend('Comment')

const me = L.User.current()

const post = new Post()
post.title = 'Sample Title'
post.user = me

post
  .save(true)
  .then(newPost => console.log(newPost))

// .loginWithEmail
// .loginWithUsername
// .login
L
  .User
  .loginWithEmail(email, password)
  .then(user => console.log(user))
  .catch(err => console.error(err))

L.User.logout()

License

MIT.

Current Tags

  • 0.0.0                                ...           latest (5 years ago)

1 Versions

  • 0.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2017 © taobao.org |