Open bdqnghi opened 7 years ago
I solved this with hack:
First, I added into node_modules/allcountjs/core/index.js
few lines:
//In the beginning
var request = require('request');
...
function configure() {
....
injection.bindFactory('Request', function () {
return request;
});
Then, in configuration file:
beforeSave: function (Entity, Crud, Console, ValidationError, Request) {
return new Promise(resolv => {
Request.get('http://127.0.0.1:5555', x => {
resolv();
})
})
Or better read this https://github.com/allcount/allcountjs/blob/master/docs/customizing.md
I have some existing Rest APIs that provide some information and I want to integrate Allcountjs with my APIs, how can I call it from inside an AllcountJS app?