Flexmonster MongoDB Connector is configured through the parameters that can be passed to it during initialization.
This guide describes the available configurations for Flexmonster MongoDB Connector. To start working with the Connector, see Embedding the MongoDB Connector into the server.
Here is an example of setting configurations for the Connector:
// Define config
const 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 mongoConnector = new fm_mongo_connector.MongoDataAPI(config);
// Define config
const 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 mongoConnector: MongoDataAPI = fm_mongo_connector.new MongoDataAPI(config);