poyocore-back

1.1.7 • Public • Published

poyocore-back

Here is hello world example :

var PoyoCore = require('poyocore-back');
 
var pc = new PoyoCore();
 
pc.api.addMethod({
    endPoint: 'api/myData',
    name: 'list',
    HTTPMethod: 'GET',
    action: function(resolve, reject) {
        // - this - contains all the informations you will need about your request
        // console.log(this);
        resolve({
            hello:"world"
        });
    }
});
 
pc.server.start();
// Just try to reach http://localhost:8080/api/myData/list

Package Sidebar

Install

npm i poyocore-back

Weekly Downloads

3

Version

1.1.7

License

LGPL-3.0

Last publish

Collaborators

  • poyoman