EzDevInfo.com

NodeBB

Node.js based forum software built for the modern web NodeBB Forum Software | Drive user engagement with a modern community platform nodebb forum software - a better community platform for the modern web. nodebb is a next generation forum software that's free and easy to use.

How to fix the admin account for NodeBB was locked

I was unable to login NodeBB as admin,it indicate the admin user was locked temporarily! How to fix the issue, I used the Redis as database.


Source: (StackOverflow)

Theme Renders Incorrectly in NodeBB App

I recently tried NodeBB (The Forum software for the future!) and really liked it a lot, especially the admin control panel(ACP) which has in-built plugin and theme installation feature. When I changed the default theme to my liking, the pages load but no content can be seen. It might be a problem with loading the CSS.

Thanks ahead for any help:)


Source: (StackOverflow)

Advertisements

NodeBB (Redis) Retrieve Usernames and Passwords

I would like to query my Redis server for a username's matching password. How can I do this? I have very little experience with both Redis and Node so I wasn't able to find the key that stores such.

Any help is well appreciated!


Source: (StackOverflow)

Hosting a web application on an ad-hoc network in linux

This is my first question on SO. Basically, I am attempting to create a sort of offline neighborhood forum. I have setup NodeBB to host a forum locally, but the problem is allowing users to connect. Eventually I plan to use a high-strength wireless router to broadcast an open network, and from there redirect all traffic to the local page. In the mean time, I was wondering if it would be possible to implement this with by means of an ad-hoc network. Broadcasting an ad-hoc network seems easy enough, but how might I redirect the traffic to the port running NodeBB? Any help or comments on the overall idea would be greatly appreciated.


Source: (StackOverflow)

RegExp to ignore everything between and
 tags

trying to parse some content (no DOM available - or DOM parser for that matter i.e. jQuery, Cheerio) to replace some words/symbols (basically emotions) by images, BUT would like to ignore everything in between <code></code> and <pre></pre> this example works great on replacing all the emotions, but doesn't ignore code and pre tags http://jsbin.com/odARehI/5/edit?js,console

if you run the script, you will see the first print out before the code tag and the second after.

would appreciate another set of eyes on that pattern. Thanks

// see link for a list of the emotions to parse
var pattern = /&gt;:\)|\([\w~]+\)|\\[:]?[od]\/|[:;\|bBiIxX8\(\)\]][=\-"^:]?[)>$&|\w\(\)*@#?]?[)>$&|\w\(\)*@#?]/g;

I tried few things that didn't work without messing up the original match.

For the Don't-parse-html-with-regex-police-department: this is running server side and I do not have the luxury for a DOM parser at the moment.

Thank you.

UPDATE: for a RegExp solution to ignore <code> tags see this neat solution thanks to github/frissdiegurke in this commit

/(^|<\/code>)([^<]*|<(?!code>))*(<code>|$)/g

Source: (StackOverflow)

Creating a passport strategy from user data from another node application (for NodeBB)

I've looked this up on Google to no avail.

I want to create a Passport strategy so users from my other node.js app can log in instantly to nodebb, but I haven't seen this working in action. I believe I should request the log in details from the other app.

I can't use oauth because this is for an internal forum and I only want to allow certain members of staff access to it.

What I believe should happen is this:

  1. The user should use the link from the other application to the NodeBB forum.
  2. The NodeBB forum, using passport, should request the details from the other app or, if they are not logged in, redirect them to the other app, which in turn redirects back to the forum.
  3. If they haven't used the forum before, then they should go through the user wizard.
  4. Their user for the forum is saved on to the forum redis and the forum should handle the rest.

Is that correct? How do I go on about doing this?


Source: (StackOverflow)

NodeBB v0.4.3 build fail?

I'm trying NodeBB first time.

https://nodebb.org/

According to https://github.com/designcreateplay/NodeBB

README.md

The badge indicates - build | failing

Does this mean that this version(0.4.3) fails?

I currently use MacOSX 10.9.2 and

git clone -> npm install process fails.

According to NodeBB Installation by OS https://docs.nodebb.org/en/latest/installing/os.html

OSX is not officially listed there, but perhaps during the development, it would be easiest to run nodeBB in native environment, so I prefer to run on OSX. Is it possible?

If not possible I would run Ubuntu on virtualBox, and try, but still the build | failing badge gives me an something-is-wrong impression.

Please advise. Thanks.

(EDIT) The error I've seen on npm install on OSX10.9

> ws@0.4.31 install /Users/ken/NodeBB/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/bufferutil.node
  SOLINK_MODULE(target) Release/bufferutil.node: Finished
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/validation.node
  SOLINK_MODULE(target) Release/validation.node: Finished
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/ken/NodeBB/npm-debug.log
npm ERR! not ok code 0

(EDIT2) The latest log in /Users/ken/NodeBB/npm-debug.log

11776 verbose true,/Users/ken/NodeBB/node_modules,/Users/ken/NodeBB/node_modules unbuild nconf@0.6.9
11777 info postuninstall nconf@0.6.9
11778 silly gunzTarPerm extractEntry lib/server.js
11779 silly gunzTarPerm extractEntry lib/utils.js
11780 http 200 https://registry.npmjs.org/mute-stream
11781 silly registry.get cb [ 200,
11781 silly registry.get   { date: 'Fri, 23 May 2014 14:14:54 GMT',
11781 silly registry.get     server: 'CouchDB/1.5.0 (Erlang OTP/R16B)',
11781 silly registry.get     etag: '"894HXUM1QSNIUNJ926RHD26P1"',
11781 silly registry.get     'content-type': 'application/json',
11781 silly registry.get     via: '1.1 varnish',
11781 silly registry.get     'cache-control': 'max-age=1',
11781 silly registry.get     'content-length': '11697',
11781 silly registry.get     'accept-ranges': 'bytes',
11781 silly registry.get     age: '160',
11781 silly registry.get     'x-served-by': 'cache-v44-ASH, cache-ty67-TYO',
11781 silly registry.get     'x-cache': 'HIT, HIT',
11781 silly registry.get     'x-cache-hits': '2, 1',
11781 silly registry.get     'x-timer': 'S1400854494.432590,VS0,VE264',
11781 silly registry.get     vary: 'Accept',
11781 silly registry.get     'keep-alive': 'timeout=10, max=50',
11781 silly registry.get     connection: 'Keep-Alive' } ]
11782 silly gunzTarPerm extractEntry lib/cache/maybe-github.js
11783 silly gunzTarPerm extractEntry make.bat
11784 silly gunzTarPerm extractEntry lib/self-closing.js
11785 silly gunzTarPerm extractEntry lib/parser.js
11786 silly gunzTarPerm extractEntry lib/transport.js
11787 silly gunzTarPerm extractEntry lib/util.js
11788 silly addNameRange number 2 { name: 'mute-stream',
11788 silly addNameRange   range: '>=0.0.4-0 <0.1.0-0',
11788 silly addNameRange   hasData: true }
11789 silly addNameRange versions [ 'mute-stream', [ '0.0.1', '0.0.2', '0.0.3', '0.0.4' ] ]
11790 verbose addNamed [ 'mute-stream', '0.0.4' ]
11791 verbose addNamed [ '0.0.4', '0.0.4' ]
11792 silly lockFile 71666a8b-mute-stream-0-0-4 mute-stream@0.0.4
11793 verbose lock mute-stream@0.0.4 /Users/ken/.npm/71666a8b-mute-stream-0-0-4.lock
11794 silly gunzTarPerm extractEntry man/man1/npm-prune.1
11795 silly gunzTarPerm extractEntry man/man1/npm-README.1
11796 silly lockFile 00d36016-ute-stream-mute-stream-0-0-4-tgz https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.4.tgz
11797 verbose lock https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.4.tgz /Users/ken/.npm/00d36016-ute-stream-mute-stream-0-0-4-tgz.lock
11798 silly gunzTarPerm extractEntry spec/ngram_spec.js
11799 silly gunzTarPerm extractEntry spec/levenshtein_spec.js
11800 silly gunzTarPerm extractEntry lib/runtime.js
11801 silly gunzTarPerm extractEntry lib/utils.js
11802 verbose addRemoteTarball [ 'https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.4.tgz',
11802 verbose addRemoteTarball   'a9219960a6d5d5d046597aee51252c6655f7177e' ]
11803 info retry fetch attempt 1 at 23:14:53
11804 verbose fetch to= /var/folders/vx/pzsc12rd5r7grfzyn35m2_500000gn/T/npm-17914-Guy7CgQf/1400854493932-0.5716184307821095/tmp.tgz
11805 http GET https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.4.tgz
11806 error Error: EACCES, open '/Users/ken/.npm/optimist/0.6.0/package.tgz'
11806 error  { [Error: EACCES, open '/Users/ken/.npm/optimist/0.6.0/package.tgz']
11806 error   errno: 3,
11806 error   code: 'EACCES',
11806 error   path: '/Users/ken/.npm/optimist/0.6.0/package.tgz',
11806 error   parent: 'nconf' }
11807 error Please try running this command again as root/Administrator.
11808 error System Darwin 13.1.0
11809 error command "/Users/ken/.nvm/v0.10.28/bin/node" "/Users/ken/.nvm/v0.10.28/bin/npm" "install"
11810 error cwd /Users/ken/NodeBB
11811 error node -v v0.10.28
11812 error npm -v 1.4.9
11813 error path /Users/ken/.npm/optimist/0.6.0/package.tgz
11814 error code EACCES
11815 error errno 3
11816 error stack Error: EACCES, open '/Users/ken/.npm/optimist/0.6.0/package.tgz'
11817 verbose exit [ 3, true ]

Source: (StackOverflow)

Tranfer/Convert data from Redis to MongoDB

I have a forum which is using Redis when I'm not sure about noSQL. That was my mistakes. The forum is getting bigger and bigger. I'm trying to find the way to transfer the data to mongoDB. Is it possible? I'm using nodeBB.


Source: (StackOverflow)

NodeBB with Nginx - "This web page has a redirect loop"

I'm trying to set up NodeBB at xxx.xxx.xxx.xxx/nodebb. I have the following settings for Nginx and NodeBB:

/etc/nginx/conf.d/nodebb.conf

server {
    listen 80;

    server_name localhost;

    location /nodebb/ {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_set_header X-NginX-Proxy true;

        proxy_pass http://127.0.0.1:4567/;
        proxy_redirect off;

        # Socket.IO Support
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}

/usr/share/nginx/nodebb/config.json

{
    "base_url": "http://`xxx.xxx.xxx.xxx",
    "port": "4567",
    "secret": "xxxxxx-xxxxxxxxxxx-xxxxxx-xxxxx",
    "bind_address": "0.0.0.0",
    "database": "mongo",
    "mongo": {
        "host": "127.0.0.1",
        "port": "27017",
        "username": "xxxxxxxx",
        "password": "xxxxxxxxxxx",
        "database": "xxxxxxx"
    },
    "bcrypt_rounds": 12,
    "upload_path": "/public/uploads",
    "use_port": false,
    "relative_path": "/nodebb"
}

When I navigate to xxx.xxx.xxx.xxx/nodebb I get redirected to xxx.xxx.xxx.xxx/nodebb/404 with a browser error message This web page has a redirect loop. Any ideas what I'm doing wrong?

Edit: Just to say that if I navigate to http://xxx.xxx.xxx.xxx:4567/nodebb/ - it works fine


Source: (StackOverflow)

Redirection to route in plugin of NodeBB

I have a plugin that executes a "filter:topic.get"

I need to doing a redirection to custom server route (localhost:4567/topicerror) when a "if clause" is true.

I need that

plugin.filterTopicGetMethod = function (postContent, callback) {
   if(awesomeCondition == true ) {
       //Do a redirection
   }
callback(null, postContent)
};

What is the way for doing this?

Thanks

The GitHub plugin page

https://github.com/rbbau/nodebb-plugin-tagstitle

https://github.com/exo-do/nodebb-plugin-tagstitle


Source: (StackOverflow)

How to serve Ghost and NodeBB in subfolders?

I have an server installed Ghost and NodeBB on it. I am using Nginx as proxy server. The problem is, I can't serve Ghost in domain.com and NodeBB in domain.com/forum. They mixes up. It could work alright under subdomains but, I'll also buy a cheap SSL certificate that only for single domain without subdomains support.

My Nginx config:

    server {
    listen 80;
    server_name domain.com;

    location / {
        proxy_set_header   X-Real-IP $remote_addr;
        proxy_set_header   Host      $http_host;
        proxy_pass         http://127.0.0.1:2368;
    }
    location /forum {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_set_header X-NginX-Proxy true;

        proxy_pass http://127.0.0.1:4567/;
        proxy_redirect off;

        # Socket.IO Support
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}

I wonder which part is wrong?


Source: (StackOverflow)

How to redirect all HTTP requests to HTTPS in NodeBB using Apache?

I'm using NodeBB on Ubuntu 14.04 running Apache 2.4. I've installed a signed SSL certificate and verified HTTPS is working on my site.

I know how to redirect all HTTP requests to HTTPS via .htaccess:

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://example.com/$1 [R,L]

But I have no idea how to go about this in NodeBB. How can I redirect all HTTP requests to HTTPS using NodeBB?


Source: (StackOverflow)

Application Error when viewing NodeBB app on Heroku

The log for my app is producing this set of errors on load and even though NodeBB binds to the port, Heroku errors because it says it cannot bind to the port. Any idea why that is or if this is related to a setting I have somewhere?

Jul 17 05:41:28 fateoftime app/web.1:  info: Initializing NodeBB v0.4.3 
Jul 17 05:41:28 fateoftime app/web.1:  info: * using configuration stored in: /app/config.json 
Jul 17 05:41:28 fateoftime app/web.1:  info: * using redis store at ray.redistogo.com:9748 
Jul 17 05:41:28 fateoftime app/web.1:  info: * using themes stored in: /app/node_modules 
Jul 17 05:41:29 fateoftime app/web.1:  info: Enabling 'trust proxy' 
Jul 17 05:41:29 fateoftime app/web.1:  info: [user.startJobs] Registering User Jobs 
Jul 17 05:41:29 fateoftime app/web.1:  info: [sounds] Sounds OK 
Jul 17 05:41:29 fateoftime app/web.1:  warn: [plugins/nodebb-plugin-mentions] This plugin may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing. 
Jul 17 05:41:29 fateoftime app/web.1:  warn: [plugins/nodebb-plugin-mentions] In the event of an unresponsive NodeBB caused by this plugin, run ./nodebb reset plugin="nodebb-plugin-mentions". 
Jul 17 05:41:29 fateoftime app/web.1:  info: [meta/css] Minifying LESS/CSS 
Jul 17 05:41:29 fateoftime app/web.1:  info: [themes] Compiling templates 
Jul 17 05:41:29 fateoftime app/web.1:  info: NodeBB attempting to listen on: 127.0.0.1:16312 
Jul 17 05:41:29 fateoftime app/web.1:  info: [themes] Successfully compiled templates. 
Jul 17 05:41:30 fateoftime app/web.1:  info: NodeBB is now listening on: 127.0.0.1:16312 
Jul 17 05:41:30 fateoftime app/web.1:  info: NodeBB v0.4.3 Copyright (C) 2013-2014 NodeBB Inc. 
Jul 17 05:41:30 fateoftime app/web.1:  info: [meta/css] Done. 
Jul 17 05:41:31 fateoftime heroku/web.1:  Starting process with command `node app.js` 
Jul 17 05:41:37 fateoftime app/web.1:  info: NodeBB Ready 
Jul 17 05:41:37 fateoftime app/web.1:  info: [meta/js] Compilation complete 
Jul 17 05:42:27 fateoftime heroku/web.1:  State changed from starting to crashed 
Jul 17 05:42:31 fateoftime heroku/web.1:  Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch 
Jul 17 05:42:31 fateoftime heroku/web.1:  Stopping process with SIGKILL 
Jul 17 05:42:31 fateoftime heroku/web.1:  Process exited with status 137 
Jul 17 08:12:48 fateoftime heroku/router:  at=error code=H10 desc="App crashed" method=GET path="/" host=www.fateoftime.com request_id=43be8d61-3251-4bb9-b5b1-8eb06092f140 fwd="104.36.225.21" dyno= connect= service= status=503 bytes= 

Source: (StackOverflow)

Using Docker to build an image for Node, my Express based Node app, MongoDb, and NodeBB, connected via Passport

I've just been introduced to Docker and the concept is awesome. I've found simple Dockerfiles for building an image for MongoDB and Node and was wondering, do I just combine those images together to make one image that has my project which is a combination of a custom Node app (built on Express), a NodeBB forum, backed by MongoDB, all wired together with Passport providing single-sign-on. Or should I make them all separate Images.

Can a Docker image contain its own VPN with the various services running on different VMs?


Source: (StackOverflow)

Having problems running nodeBB with redis on windows7

I install redis on win7 by exe and I got nodeBB on there are some first time config prompt and then nodeBB even start populating database with default config.

After entering admin name email pwd, I got stuck here as below:

c:\Users\kaeyonbaker\Downloads\NodeBB-master\NodeBB-master\node_modules\redis\in dex.js:535 throw err; ^ TypeError: Object # has no method 'genSalt' at Object.User.hashPassword (c:\Users\kaeyonbaker\Downloads\NodeBB-master\No deBB-master\src\user.js:555:10) at c:\Users\kaeyonbaker\Downloads\NodeBB-master\NodeBB-master\src\user.js:13 3:11 at try_callback (c:\Users\kaeyonbaker\Downloads\NodeBB-master\NodeBB-master\ node_modules\redis\index.js:532:9) at RedisClient.return_reply (c:\Users\kaeyonbaker\Downloads\NodeBB-master\No deBB-master\node_modules\redis\index.js:614:13) at ReplyParser. (c:\Users\kaeyonbaker\Downloads\NodeBB-master\Nod eBB-master\node_modules\redis\index.js:266:14) at ReplyParser.EventEmitter.emit (events.js:95:17) at ReplyParser.send_reply (c:\Users\kaeyonbaker\Downloads\NodeBB-master\Node BB-master\node_modules\redis\lib\parser\javascript.js:300:10) at ReplyParser.execute (c:\Users\kaeyonbaker\Downloads\NodeBB-master\NodeBB- master\node_modules\redis\lib\parser\javascript.js:189:22) at RedisClient.on_data (c:\Users\kaeyonbaker\Downloads\NodeBB-master\NodeBB- master\node_modules\redis\index.js:488:27) at Socket. (c:\Users\kaeyonbaker\Downloads\NodeBB-master\NodeBB-m aster\node_modules\redis\index.js:82:14)

Then i change redis into mongo and i've got the similar error as below:

c:\Users\kaeyonbaker\Downloads\NodeBB-master\NodeBB-master\node_modules\mongodb\ lib\mongodb\connection\base.js:242 throw message; ^ TypeError: Object# has no method 'genSalt' at Object.User.hashPassword (c:\Users\kaeyonbaker\Downloads\NodeBB-master\No deBB-master\src\user.js:555:10) at c:\Users\kaeyonbaker\Downloads\NodeBB-master\NodeBB-master\src\user.js:13 3:11 at c:\Users\kaeyonbaker\Downloads\NodeBB-master\NodeBB-master\src\database\m ongo.js:418:5 at c:\Users\kaeyonbaker\Downloads\NodeBB-master\NodeBB-master\node_modules\m ongodb\lib\mongodb\collection\core.js:703:14 at c:\Users\kaeyonbaker\Downloads\NodeBB-master\NodeBB-master\node_modules\m ongodb\lib\mongodb\db.js:1098:5 at c:\Users\kaeyonbaker\Downloads\NodeBB-master\NodeBB-master\node_modules\m ongodb\lib\mongodb\db.js:1806:9 at Server.Base.callHandler (c:\Users\kaeyonbaker\Downloads\NodeBB-master\No deBB-master\nodemodules\mongodb\lib\mongodb\connection\base.js:442:41) at c:\Users\kaeyonbaker\Downloads\NodeBB-master\NodeBB-master\node_modules\m ongodb\lib\mongodb\connection\server.js:485:18 at MongoReply.parseBody (c:\Users\kaeyonbaker\Downloads\NodeBB-master\NodeBB -master\node_modules\mongodb\lib\mongodb\responses\mongo_reply.js:68:5) at null. (c:\Users\kaeyonbaker\Downloads\NodeBB-master\NodeBB-mas ter\node_modules\mongodb\lib\mongodb\connection\server.js:443:20)


Source: (StackOverflow)