Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jason-gao/node-api-mongo


https://github.com/jason-gao/node-api-mongo

Last synced: about 14 hours ago
JSON representation

Awesome Lists containing this project

README

        

License
-------
MIT License

# todo
- var->const
- same response
- code format
- exception
- 时间搜索优化

# error
- Topology was destroyed resolve with pool

#query
- and
- {'title':'data1','view':5000}
- or
- {$or:[{'title':'data1'},{'view':{$gt:5000}}]}
- and or
- {'view':{$gt:3000},$or:[{'title':'data1'},{'description':'this is data2'}]}
- time
- {"inserted_at": {"$gt":ISODate("2019-05-29 0:0:0.000Z"),"$lt":ISODate("2019-05-30 0:0:0.000Z")}}
- "inserted_at":{"$gt":new Date(new Date(dateStr+" 8:00:00").toISOString()),"$lt":new Date(new Date(nextDateStr+" 8:00:00").toISOString())}

- { "qList": { $elemMatch: { "qid": 1, "reorderFlag": 0} } }
- { "qList.qid": 1, "qList.reorderFlag": 0}
- { "qList": { $elemMatch: { "qid": 1} } }
- { "qList": {$exists : true}, $where: 'this.qList.length>1' }