Set custom cookies from NodeBB

NodeBB Development

Suggested Topics


  • 6 Votes
    3 Posts
    2k Views

    @arutemu Link. Nodebb supported Nodejs 8. I install Nodejs 8 for NodeBB and Ghost, this is working and look good!

  • 0 Votes
    6 Posts
    2k Views

    @vstoykov important distinction to make, thanks 😄

  • 0 Votes
    5 Posts
    2k Views

    That's perfect, thanks!

  • 1 Votes
    4 Posts
    2k Views

    To get back on this, I have currently solved it in the following way:
    ###/lib/nodebb.js:

    module.exports = { "Meta": module.parent.parent.require('./meta'), "User": module.parent.parent.require('./user'), "Plugins": module.parent.parent.require('./plugins'), "SocketIndex": module.parent.parent.require('./socket.io/index'), "ModulesSockets": module.parent.parent.require('./socket.io/modules'), "db": module.parent.parent.require('./database') }

    ###library.js:

    var NodeBB = require('./lib/nodebb');

    ###/lib/submoduleX.js:

    var NodeBB = module.require('./nodebb'), db = NodeBB.db, User = NodeBB.User, Plugins = NodeBB.Plugins;

    ##Why this works
    I read somewhere that require caches the files you load. That means that if require my nodebb.js from library.js, I can later load nodebb.js from any submodule I want and it will work.

  • 6 Votes
    7 Posts
    5k Views

    could you fix this i would like to use it ;D