Mounts createLiveQueryServer, fix babel induced problem

This commit is contained in:
Florent Vilmart
2016-03-23 09:19:09 -04:00
parent f5fdedfbc7
commit ddb76a8650
2 changed files with 19 additions and 11 deletions

View File

@@ -79,7 +79,7 @@ addParseCloud();
// "javascriptKey": optional key from Parse dashboard
// "push": optional key from configure push
export default class ParseServer {
class ParseServer {
constructor({
appId = requiredParameter('You must provide an appId!'),
@@ -270,25 +270,25 @@ export default class ParseServer {
return api;
}
static ParseServer(options) {
let server = new ParseServer(options);
return server.app;
}
static createLiveQueryServer(httpServer, config) {
return new ParseLiveQueryServer(httpServer, config);
}
}
// Factory function
let _ParseServer = function(options) {
let server = new ParseServer(options);
return server.app;
}
// Mount the create liveQueryServer
_ParseServer.createLiveQueryServer = ParseServer.createLiveQueryServer;
function addParseCloud() {
const ParseCloud = require("./cloud-code/Parse.Cloud");
Object.assign(Parse.Cloud, ParseCloud);
global.Parse = Parse;
}
let runServer = function(options) {
return ParseServer.ParseServer(options);
}
export default ParseServer;
export { S3Adapter, GCSAdapter, FileSystemAdapter };
export { runServer as ParseServer };
export { _ParseServer as ParseServer };