2016-07-02 14:08:13 +01:00
|
|
|
import ParseServer from './ParseServer';
|
|
|
|
|
import S3Adapter from 'parse-server-s3-adapter'
|
|
|
|
|
import FileSystemAdapter from 'parse-server-fs-adapter'
|
|
|
|
|
import InMemoryCacheAdapter from './Adapters/Cache/InMemoryCacheAdapter'
|
2016-09-07 21:08:09 +09:00
|
|
|
import NullCacheAdapter from './Adapters/Cache/NullCacheAdapter'
|
2016-09-17 16:52:02 -04:00
|
|
|
import RedisCacheAdapter from './Adapters/Cache/RedisCacheAdapter'
|
2016-11-21 05:53:16 -08:00
|
|
|
import * as TestUtils from './TestUtils';
|
2016-08-12 13:25:24 -04:00
|
|
|
import { useExternal } from './deprecated';
|
|
|
|
|
import { getLogger } from './logger';
|
2017-01-13 19:34:04 -05:00
|
|
|
import { PushWorker } from './Push/PushWorker';
|
2016-01-28 10:58:12 -08:00
|
|
|
|
2016-03-23 09:19:09 -04:00
|
|
|
// Factory function
|
2016-12-07 15:17:05 -08:00
|
|
|
const _ParseServer = function(options) {
|
|
|
|
|
const server = new ParseServer(options);
|
2016-03-23 09:19:09 -04:00
|
|
|
return server.app;
|
|
|
|
|
}
|
|
|
|
|
// Mount the create liveQueryServer
|
|
|
|
|
_ParseServer.createLiveQueryServer = ParseServer.createLiveQueryServer;
|
|
|
|
|
|
2016-12-07 15:17:05 -08:00
|
|
|
const GCSAdapter = useExternal('GCSAdapter', 'parse-server-gcs-adapter');
|
2016-04-05 18:18:49 -04:00
|
|
|
|
2016-08-12 13:25:24 -04:00
|
|
|
Object.defineProperty(module.exports, 'logger', {
|
|
|
|
|
get: getLogger
|
|
|
|
|
});
|
|
|
|
|
|
2016-03-23 09:19:09 -04:00
|
|
|
export default ParseServer;
|
2017-01-13 19:34:04 -05:00
|
|
|
export { S3Adapter, GCSAdapter, FileSystemAdapter, InMemoryCacheAdapter, NullCacheAdapter, RedisCacheAdapter, TestUtils, PushWorker, _ParseServer as ParseServer };
|