sasjs / server

Build Apps on Base SAS
https://server.sasjs.io
MIT License
20 stars 3 forks source link

MongoServerError: The 'expireAfterSeconds' option is supported on '_ts' field only. at Connection.onMessage #339

Closed SamBruner-USDA closed 1 year ago

SamBruner-USDA commented 1 year ago

we are using a mondo db compatible database in cosmosdb. We get this error when we try to start sasjs server

MongoServerError: The 'expireAfterSeconds' option is supported on '_ts' field only. at Connection.onMessage

allanbowe commented 1 year ago

Investigating these resources:

It appears we need to enable compatibility mode for COSMOS-hosted Mongo DB instances.

We propose to support this through the addition of an additional server setting - DB_TYPE. This will be MONGODB by default, with an alternative setting of COSMOS_MONGODB.

DB_TYPE=COSMOS_MONGODB will result in compatibility mode being enabled.