One of my friend has this issue, we are hosting the api using lite-server, and access the api on browser, it says callback is not a function.
'use strict';
(function () {
var StoreAPI = require('Store');
module.exports = {
getBooks: function (event, context,callback) {
var books;
StoreAPI.getAll('books', function(err,data){
console.log(data);
callback({
path: data.path,
error: false,
errorCode: 0,
body: {
books : data
}
});
});
}
};
} ());
url goes as: