node app --setupWhat happened instead: Now configuring mongo database: 2021-03-12T17:06:56.884Z  - warn: NodeBB Setup Aborted. MongoServerSelectionError: connection <monitor> to 168.63.xxx.xxx:27017 closed at Timeout._onTimeout (C:\Codes\NodeBB\node_modules\mongodb\lib\core\sdam\topology.js:438:30) at listOnTimeout (node:internal/timers:557:17) at processTimers (node:internal/timers:500:7)
Adding a column in MongoDB
My goal is to add a number value that is attached to every user who creates an account. When the user creates an account, they type in a number that is sent to them. Once they start using the account that number increases as time goes on. I'm not worried about the logic, I've already got that figured out. But I am new to Mongo...how do I add a column into Mongo that will take in and store a number that a user types in when creating an account?
Giggiux last edited by
You can just use the
User.setUserField(uid, field, value, callback)function, by importing the
To set the value while creating the account, I suggest you to check the custom registration field (or something like that) plugin and use it, or taking inspiration from it.