0.0.12 • Published 9 years ago

koa-parse-restapi v0.0.12

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

koa-parse-restapi

To install simply run:

npm install koa-parse-restapi

Require koa first and will only work on node v0.11.7 or newer.

You must run node with --harmony flag (--harmony-generators works as well)

node --harmony example.js
var koa = require('koa');
var Parse = require('koa-parse-restapi');
var meepbee = new Parse('application_id', 'rest_api_key');

var app = koa();

app.use(function *() {

    var products = yield meepbee.classes('Products').getAll();
    console.log(JSON.parse(products.body));

    var users = yield meepbee.users().getAll();
    console.log(JSON.parse(users.body));

    var comments = yield meepbee.classes('Comments').getAll('?include=commenter');
    console.log(JSON.parse(comments.body));



    this.body = products;
});

app.listen(process.env.PORT || 8080);
0.0.12

9 years ago

0.0.11

9 years ago

0.0.10

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago