Skip to content

Developer FAQ

25 Topics 201 Posts

What is the Developer FAQ?

This category is meant to showcase developer questions that have been answered in-depth by other forum users. We collect these topics in this category because they have been asked multiple times, and the answers to them are sometimes more complicated than a single line or two of explanation/code.

Do you have an idea for a topic we should include in the Developer FAQ? Let us know via chat (or reply to the topic you'd like to see migrated here).

  • How do I stop my emails from ending up in the spam folder?

    Moved Solved
    3
    1 Votes
    3 Posts
    585 Views
    julianJ
    By default, NodeBB instances should be able to send email out of the box. However, having the server send emails is not ideal, as the server itself does not have any reputation (and in some cases, may have a negative reputation if a spammer sent messages from the IP in the past). In nearly all cases, you will want to open up an account with a third-party emailer service, who can handle these outgoing messages for you. Here at NodeBB, we recommend "nodebb-plugin-emailer-sendgrid", which is installable via the admin control panel. SendGrid has a free tier that is fairly generous, so you should not have to pay any upfront or recurring costs. Once the plugin is installed and activated, you will need to register a new account at SendGrid and create an API key for NodeBB to use.
  • How do two sites (NodeBB and another) share a single domain name (/ vs /forum)

    Moved Solved
    3
    0 Votes
    3 Posts
    1k Views
    cleoC
    @julian Thanks so much ! This totally make sense. Worth to note, to add proxy_pass blocks to static files too.
  • What is the proper way to add custom fields to a user profile hash?

    Moved Solved
    7
    3 Votes
    7 Posts
    2k Views
    julianJ
    That's awesome @baris I'm assuming backwards compatible with the old method, though that ought to be deprecated?
  • howto: inject hidden data into composer?

    Moved Solved
    11
    0 Votes
    11 Posts
    6k Views
    yariplusY
    @baris said in howto: inject hidden data into composer?: the plugin is responsible for setting any new fields into topic from data. Ahhh, okay! Now I get it. The plugin needs to alter the postdata in the create and edit hooks, and that data is passed to the action and sockets. Also in case I missed it your PR was just setting .extraFields but there was no actual way to set those values in the database. That's why I am passing 2 objects to the filter:topic.create filter:post.create hooks. Unless you meant to write to the database in the action hooks, which isn't create because action hooks don't have callbacks to send back errors and execution just keeps going. Yes, that makes total sense now. I was indeed altering the database in the action hook. Altering the postdata in the create hooks is the right way.
  • What do typical production server requirements look like?

    Moved
    44
    2 Votes
    44 Posts
    23k Views
    B
    GCE prices are pretty nice and without the 3 year commitment.