0.0.12 • Published 10 years ago

koa-parse-restapi v0.0.12

Weekly downloads
2
License
MIT
Repository
github
Last release
10 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

10 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago