Reputation: 9229
I am trying to create a new table on my nodeJS custom Azure Mobile App backend. The table is called readings.js
:
var azureMobileApps = require("azure-mobile-apps");
var table = azureMobileApps.table();
table.columns = {
"text": "string",
"complete": "boolean"
};
module.exports = table;
app.js
:
var express = require("express");
var azureMobileApps = require("azure-mobile-apps");
var app = express();
var mobileApp = azureMobileApps({
homePage: true,
swagger: true
});
mobileApp.tables.import("./tables");
mobileApp.tables.initialize()
.then(function () {
app.use(mobileApp); // Register the Azure Mobile Apps middleware
app.listen(process.env.PORT || 3000); // Listen for requests
});
and yet, this is the reposnse I get when POST'ing to the API:
Why is this error occurring?
Upvotes: 0
Views: 375
Reputation: 13918
It seems you are developing Azure Mobile Apps on local environment. Here is a post in the same scenario guiding you how to do. You can refer to detailed info.
Regarding your issue, post data via POSTMAN, please try to select the raw
radio button in body
tab, and select the JSON
content type, then directly write the json object in the textare.
Any further concern, please feel free to let me know.
Upvotes: 3