This guide describes how to configure Flexmonster MongoDB Connector. For instructions on using the Connector, see Embedding the MongoDB Connector into the server.
This tutorial contains the following sections:
Flexmonster MongoDB Connector can be configured through the ConfigInterface
object, which has the following properties:
Here is an example of setting configurations for the Connector:
// Define config let config = { cacheEnabled: true, // Setting cache memory limit to 100 MB cacheMemoryLimit: 100, // The cache will be stored for two hours cacheTimeToLive: 120, logsEnabled: true } // Pass the config when initializing the Connector let _apiReference = new MongoDataAPI(config);
// Define config let config: ConfigInterface = { cacheEnabled: true, // Setting cache memory limit to 100 MB cacheMemoryLimit: 100, // The cache will be stored for two hours cacheTimeToLive: 120, logsEnabled: true } // Pass the config when initializing the Connector let _apiReference: MongoDataAPI = new MongoDataAPI(config);