Support direct access server option (#5550)
* Support direct access config test options * add test * fix test * fix definitions * improve docs * Update .travis.yml * Revert "Update .travis.yml" This reverts commit 407f1384953b64bad9e63068db8564c3584ca3a4.
This commit is contained in:
@@ -136,7 +136,7 @@ class ParseServer {
|
||||
* @static
|
||||
* Create an express app for the parse server
|
||||
* @param {Object} options let you specify the maxUploadSize when creating the express app */
|
||||
static app({ maxUploadSize = '20mb', appId }) {
|
||||
static app({ maxUploadSize = '20mb', appId, directAccess }) {
|
||||
// This app serves the Parse API directly.
|
||||
// It's the equivalent of https://api.parse.com/1 in the hosted Parse API.
|
||||
var api = express();
|
||||
@@ -193,7 +193,10 @@ class ParseServer {
|
||||
ParseServer.verifyServerUrl();
|
||||
});
|
||||
}
|
||||
if (process.env.PARSE_SERVER_ENABLE_EXPERIMENTAL_DIRECT_ACCESS === '1') {
|
||||
if (
|
||||
process.env.PARSE_SERVER_ENABLE_EXPERIMENTAL_DIRECT_ACCESS === '1' ||
|
||||
directAccess
|
||||
) {
|
||||
Parse.CoreManager.setRESTController(
|
||||
ParseServerRESTController(appId, appRouter)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user