Fixed variable scope for `key`

Maybe the way I have implemented the module is just wrong, but I was not able to get even the setup right — the server was crashing with an error stating that `key` is missing …

If using the `settings.key` instead of `exports.key` the module works as expected.