npm install
docker run -d -p 10000:27017 --name mongodb-4.2-polygon-test mongo:4.2
mongo localhost:10000
db.getCollection("docs").createIndexes([{geometry: "2dsphere" }])
node app
If the index creation fails, remove documents before the index creation:
db.getCollection("docs").remove({})
db.getCollection("docs").createIndexes([{geometry: "2dsphere" }])