When using monger, do I need to supply connection each request?
问题 In the documentation, the mongodb connection is established once, before being used without passing the connection to each command, is that the proper way to use monger, or should I pass the database connection to each call? 回答1: If you work with single database then it's best to set the connection once: (mg/connect! db-spec) But it's not a good idea when you have multiple databases. Monger have with-connection macro (see API docs) for this case: (mg/with-connection db-connection ...) You may