niqdev / hapi-mongojs

Hapi MongoDB connection plugin
MIT License
4 stars 4 forks source link

"register" must be a Function #7

Open mortenko opened 6 years ago

mortenko commented 6 years ago

Is this hapi plugin compatible with the newest version Hapi ? I still get this error: "register" must be a Function

here is my code :

const mongojs = require("hapi-mongojs");

module.exports = {
  name: "mongojs",
  register: mongojs,
  options: {
    url: "mongodb://localhost:27017/react_native_db",
    collections: [
      {
        name: "users"
      }
    ]
  }
};
niqdev commented 6 years ago

Hi, I haven't try with the latest version, the code is actually simple, if you fix the issue and create a PR I'm more than happy to release a new version. Thanks