Keep in mind require.main's "scope" is app.js, so you'd have to do require.main.require('./src/groups.js'); if you want access to the groups lib.
require.main will always be app.js for plugins, since plugins are only called by NodeBB.
anyone can tell me how to install nodebb on cent on with WHM/cpanel.
so i upload nodebb to any directory and it will run their automatically like php files.
Right now shared server providers using WHM/CPanel are finding it tough to integrate Node.js, as it is a standalone application (with its own bundled web server), unlike apps like wordpress/drupal, which are PHP based.
Until such a time as this is supported, you're going to have to install NodeBB on a virtual private server (i.e. Linode, Digital Ocean)
i have VPS with installed cpanel/Whm...