db.api.connect() and close() to @database
db.api.connect() to arbitrary host and port