poyocore-back
v1.1.7
Published
Quick/easy code a node server for API, or file serve
Downloads
4
Maintainers
Readme
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