ccmjs / data-server

ccm-compatible NodeJS webserver for server-side data management via HTTP using MongoDB and CORS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deprecated code

opened this issue · comments

index.js uses deprecated code.

1: MongoDB connection

In mongodb.MongoClient.connect add the following object as second parameter to the function: { useNewUrlParser: true }

2: Replace the following code:

  • collection.insert=> collection.insertOne
  • collection.update=> collection.updateOne
  • collection.remove=> collection.deleteOne

Thank's for report. The index.js now uses now more deprecated code.