Switching the module.exports to being a self execting function