kandi X-RAY | NodeBB Summary
kandi X-RAY | NodeBB Summary
NodeBB Forum Software is powered by Node.js and supports either Redis, MongoDB, or a PostgreSQL database. It utilizes web sockets for instant interactions and real-time notifications. NodeBB takes the best of the modern web: real-time streaming discussions, mobile responsiveness, and rich RESTful read/write APIs, while staying true to the original bulletin board/forum format → categorical hierarchies, local user accounts, and asynchronous messaging. NodeBB by itself contains a "common core" of basic functionality, while additional functionality and integrations are enabled through the use of third-party plugins.
Top functions reviewed by kandi - BETA
- Set the graph
- Check for upgrading .
- Adds handlers for component
- Create the user command
- Prepare list of available widgets .
- Handle item navigation
- Sets up the AD search
- Add anchors to an anchor .
- Create the adminset password
- Update user data
NodeBB Key Features
NodeBB Examples and Code Snippets
Trending Discussions on NodeBB
I am writing a private plugin for nodebb (open forum software). In the nodebb's webserver.js file there is a line that seems to be hogging all incoming json data.
I am trying to convert all incoming json data for one of my end-points into raw data. However the challenge is I cannot remove or modify the line above.
The following code works ONLY if I temporarily remove the line above....
ANSWERAnswered 2020-Feb-05 at 01:47
bodyParser.json() middleware does the following:
- Check the response type of an incoming request to see if it is
- If it is that type, then read the body from the incoming stream to get all the data from the stream.
- When it has all the data from the stream, parse it as JSON and put the result into
req.bodyso follow-on request handlers can access the already-read and already-parsed data there.
Because it reads the data from the stream, there is no longer any more data in the stream. Unless it saves the raw data somewhere (I haven't looked to see if it does), then the original RAW data is gone - it's been read from the stream already. This is why you can't have multiple different middleware all trying to process the same request body. Whichever one goes first reads the data from the incoming stream and then the original data is no longer there in the stream.
To help you find a solution, we need to know what end-problem you're really trying to solve? You will not be able to have two middlewares both looking for the same content-type and both reading the request body. You could replace
bodyParser.json() that does both what it does now and does something else for your purpose in the same middleware, but not in separate middleware.
No vulnerabilities reported
Reuse Trending Solutions
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page