Database setup

By default, openKB uses an embedded Javascript database called nedb for easy installation. This works really well for small to medium sized applications but has it’s limitations if you wanted to scale your application to handle many articles and concurrent users. For this reason, openKB also supports using a MongoDB server by simply changing the config file.

Here is the config.js for the embedded database (NeDB):

"database": {
    "type": "embedded"

Here is an example config.js for a MongoDB server. You can use your own localhost MongoDB instance or you may choose a hosted MongoDB server like mLab.

"database": {
    "type": "mongodb",
    "connection_string": "mongodb://"
Was this article helpful? Votes: 13
Article details:
Published date: 13/09/2016 1:25AM
Last updated: 13/09/2016 1:25AM (Mark)
Share article: 
Author: Mark
database | mongodb | nedb | connection |