sasjs / server

Build Apps on Base SAS

Home Page:https://server.sasjs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

SamBruner-USDA opened this issue · comments

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

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.