Embed nodebb angular app and Authentication

Technical Support
  • Hello, we have an Angular JS based application and for discussion forums in it we are planning to use NodeBB. We dont want to open up / show another Nodebb webpage, want it to be embedded in our app. Is there a way to do that ? Also the embedded page should just have the discussion board and no headers and profiles. Is this customization possible and how ?

  • It's possible, but not easy. There are a few options:

    • create a theme for NodeBB, render NodeBB in an iframe and embed that in your page
    • render NodeBB templates in an angular component and embed that in your page
    • interface directly with the NodeBB rest API, creating a frontend in angular

Suggested Topics

  • 0 Votes
    7 Posts

    Okay so just to confirm this is caused by an error in sharp, try creating a file called test-sharp.js in your nodebb directory with the following contents:

    'use strict'; const fs = require('fs/promises'); const sharp = require('sharp'); async function run() { const input = await fs.readFile('public/logo.png'); await sharp(input) .resize({ width: 100 }) .toFile('build/public/logo.png'); } run().then(() => {}, err => setTimeout(() => { throw err; }, 0));

    Then run it like node test-sharp.js. It should create the file build/public/logo.png. Check the exit code with echo $?.

  • 0 Votes
    4 Posts

    @pitaj and @baris , thanks for your help.

    @baris adding --series did let the image finish building, but then it would get the error when running with ./nodebb start

    @pitaj, I changed the pgBouncer (connection pool) to "session" mode instead of "transaction" mode in the DigitalOcean settings and that seems to have allowed it to eventually run.

    I say "eventually" run because the first time I tried after making the change I got this error:

    error: error: prepared statement "getSortedSetRangeWithScoresAsc" already exists

    the second time I got this error:

    error: error: prepared statement "getObject" already exists

    and the third time it ran successfully!

    At this point I have started and stopped the docker image a couple times and it seems to be stable.

    Thanks for your help guys!

  • 1 Votes
    5 Posts

    @julian I saw manual for it (but on Russian): https://habrahabr.ru/post/264301/
    And did find special service for Telegram login (not tested): https://telegramlogin.com/
    I hope Its will help a little bit

  • 0 Votes
    2 Posts

    It works with when I start with

    node app

    not with

    ./nodebb start


  • 0 Votes
    5 Posts

    Well... If you already have NodeBB running on port 80 without nginx/Apache proxy, then you can not assign another service on the port as well. I recommend you to set up an nginx/Apache proxy for NodeBB and create virutal hosts for each service you want to run on port 80 (this way you can run multiple services/sites on port 80).