metaFields
work together with camlCondition
nicely. Regarding restCondition
, my bad I've forgotten that I abandoned the idea for bypassing REST conditions (there was an interface for that by no handler).sp-rest-proxy help please
I am trying to set up a dev enviroment but cannot get SharePoint Online auth working.
npm install sp-rest-proxy --save-dev
server.js
const RestProxy = require('sp-rest-proxy');
const settings = {
configPath: './config/private.json', // Location for SharePoint instance mapping and credentials
port: 8080, // Local server port
staticRoot: './static' // Root folder for static content
};
const restProxy = new RestProxy(settings);
restProxy.serve();
exportsiteurl.js
. Custom config within your particular app I guess. There are two techniques: one is conditionally switching endpoint URL (on localhost condition, similar as this helper does) or providing local server (WebPack Dev server, for instance, has API proxy setting) an extra setting to route to sp-rest-proxy. First one is simpler in configuration, though not so sophisticated as configuring workbench.