Skip to content

Instantly share code, notes, and snippets.

@fabiocav
Last active February 11, 2016 05:14
Show Gist options
  • Save fabiocav/e2c66433186838a0f2d5 to your computer and use it in GitHub Desktop.
Save fabiocav/e2c66433186838a0f2d5 to your computer and use it in GitHub Desktop.
module.exports = {
//"read": function (req, res, next) {
//}
}
{
"get": {
"access": "anonymous|authenticated|disabled"
},
"post": {
"access": "anonymous|authenticated|disabled"
},
"put": {
"access": "anonymous|authenticated|disabled"
},
"patch": {
"access": "anonymous|authenticated|disabled"
},
"delete": {
"access": "anonymous|authenticated|disabled"
}
}
var table = module.exports = require('azure-mobile-apps').table();
// table.read(function (context) {
// return context.execute();
// });
// table.read.use(customMiddleware, table.operation);
{
"autoIncrement": false,
"read": {
"access": "anonymous|authenticated|disabled"
},
"insert": {
"access": "anonymous|authenticated|disabled"
},
"update": {
"access": "anonymous|authenticated|disabled"
},
"delete": {
"access": "anonymous|authenticated|disabled"
},
"undelete": {
"access": "anonymous|authenticated|disabled"
}
}
@mamaso
Copy link

mamaso commented Oct 27, 2015

Custom api templates look good as well

@izerbib
Copy link

izerbib commented Feb 11, 2016

Hi,

I really not understand what does it mean:
// table.read.use(customMiddleware, table.operation);
inside table.js. When I should use it? It's added by default when i create a new 'Easy Table' from the Azure dashboard, but there is not explanation or tutorial. The table.js is not clear. Can you explain me how i can add CRUD operation with a real example?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment