Setting up MongoDB



  • I haven't been able to find a comprehensive set of directions for setting up NodeBB with MongoDB.

    I read to do this, for future people trying to set this up:
    https://github.com/markau/bcrypt-nodejs/commit/b848a268d33ea08176c01332f3419bba20f9e851

    And you have to switch to bcrypt-nodejs from bcrypt and make sure you're requiring the right one in all the files that use it.

    I also read to do this:
    https://github.com/designcreateplay/NodeBB/wiki/Setting-up-MongoDB-as-an-alternative-to-Redis
    But I can't find that file. Where is it?

    Once you have Mongo running, are you supposed to set up a schema somehow or is that done for you?

    Thirdly, here's what happens when I run the app and try to log in as an admin:

    $ node app.js
    info: NodeBB v0.2.1 Copyright (C) 2013 DesignCreatePlay Inc.
    info: This program comes with ABSOLUTELY NO WARRANTY.
    info: This is free software, and you are welcome to redistribute it under certain conditions.
    info:
    Failed to load c++ bson extension, using pure JS version
    info: Initializing NodeBB v0.2.1, on port 4567, using mongo store at 127.0.0.1:27017.
    info: NodeBB instance bound to: Any address (0.0.0.0)
    error: Error creating index text search not enabled
    info: No changes to client-side libraries -- skipping minification
    info: NodeBB Ready

    /Users/aaronclaytondunn/Documents/WebDev/nodebb/nodebb1/nodebb1/nodebb/src/login.js:40
    winston.err(err.message);
    ^
    TypeError: Object #<Object> has no method 'err'
    at /Users/aaronclaytondunn/Documents/WebDev/nodebb/nodebb1/nodebb1/nodebb/src/login.js:40:16
    at /Users/aaronclaytondunn/Documents/WebDev/nodebb/nodebb1/nodebb1/nodebb/node_modules/bcrypt-nodejs/bCrypt.js:697:3
    at process._tickCallback (node.js:599:11)

    Any ideas?


  • GNU/Linux Admin

    I read to do this, for future people trying to set this up:
    https://github.com/markau/bcrypt-nodejs/commit/b848a268d33ea08176c01332f3419bba20f9e851

    Hi @aaron, this is only applicable if you are installing NodeBB on CentOS or Mac 🙂


  • Admin Staff

    Once you have Mongo running, are you supposed to set up a schema somehow or is that done for you?

    @aaron you don't have to create a schema, collections are created as they are referenced in mongo. Also you need to enable text search in mongodb config file.

    Not sure about that last error. winston.err is defined in app.js


Log in to reply
 

Suggested Topics

| |