elasticio / casbin-mongoose-adapter

Mongoose adapter for Casbin
Apache License 2.0
15 stars 3 forks source link

[Feature Request] Ability to close connection #4

Closed eXigentCoder closed 5 years ago

eXigentCoder commented 5 years ago

Firstly thanks for putting this together, works really well!

I'm using the adapter in some tests and the tests fail to exit because the mongodb connection is still open, i'd like a way to call something like adapter.close() on the instance.

This would also be useful outside of automated tests to allow for graceful shutdown of an app.

ghaiklor commented 5 years ago

Hi, thanks for contribution. I've merged the PR, but I can not publish the package. So, if the change is hot for you, you could install it as a GitHub package.

eXigentCoder commented 5 years ago

Thanks, will use the GitHub package for now, will someone else be able publish the update to NPM at some point in the near future?

ghaiklor commented 5 years ago

@eXigentCoder I hope so, this package was written by me as part of my contract work with the company. So, the question is to actual owners of this package, I'm just a contributor :)