@julian Thanks for getting back to me quickly. Other priorities pulled me away from this, but after looking at your response, it seems like what I'm actually after are "unread" counts, not just notifications. The simple GET solution returned notifications, but not every "unread". Our app is using the session sharing plugin, and we are associating NodeBB accounts with our app accounts. Would I be able to leverage some of the session sharing functionality to get an unread count for users on our app based on their NodeBB account? Thanks
What does your plugin development environment/workflow look like?
-
Here's how I do it:
- setup mongo
- setup node v6,
npm i [email protected]
so it doesn't use[email protected]
, cuz that breaks nodebb - create
dev
directory in home folder git clone https://github.com/nodebb/nodebb
, clones into~/dev/nodebb
git clone https://github.com/nodebb/nodebb-plugin-emoji
, clones into~/dev/nodebb-plugin-emoji
cd nodebb-plugin-emoji
,npm link
cd ../nodebb
,npm install
,./nodebb setup
npm link nodebb-plugin-emoji
, this "links" the plugin into node_modules, which is better than having the git repo directly inside node_modules- setup vscode to automatically build plugin, build nodebb, and run nodebb when debugging
-
@pitaj Wow, thanks for the exhaustive instructions.
Do you really have to rebuild after every change though? In my limited experience developing Node apps, I'm usually been able to use vagrant + synced folders so that I could make a change on my desktop, sync it over to my vagrant box automatically, and the change taking effect immediately.
Is that kind of workflow not possible with nodeBB?
-
Some things you do, some things you don't. It's complicated.
-
@wfsaxton We use
grunt
to listen for file changes and rebuild automatically. You could consider that as wellThe reason why re-building is necessary is because some items are built once before you start NodeBB, and used from then onwards. This blog post goes into more detail about why we use a build system now.
-
@PitaJ are these instructions still accurate?
-
@GarrettBryan mostly. Updated instructions:
Here's how I do it:
- setup mongo
- setup node v10, no npm changes necessary
cd ~
,mkdir dev
,cd dev
git clone https://github.com/nodebb/nodebb
, clones into~/dev/nodebb
git clone https://github.com/nodebb/nodebb-plugin-emoji
, clones into~/dev/nodebb-plugin-emoji
cd nodebb-plugin-emoji
,npm link
cd ../nodebb
,./nodebb setup
npm link nodebb-plugin-emoji
, this "links" the plugin into node_modules, which is better than having the git repo directly inside node_modules- setup vscode to automatically build plugin, build nodebb, and run nodebb when debugging
-
Thanks @PitaJ ! I use Atom and Sublime Text2. Any suggestions for debugging?
-
@GarrettBryan well I strongly suggest VS Code as it's essentially Atom but better in every way. It has a built in debugger and everything.
Beyond that, can't help you. I suggest you Google it.
-
@PitaJ I just started with VS Code, thanks for the motivation to try something new.