I have spent doing such a straight forward thing. I just want to do a CRUD operation on a user model using nodejs, mongoose, restify stack. My mongo instance is on mongolab. Th
MongoDB 2d index requires the legacy coordinates pairs format, which is just an array of coordinates like [1, 2].
2d
[1, 2]
If you need GeoJSON support, please use the 2dsphere index.
userSchema.index({loc:'2dsphere'});