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: 18
Article details:
Published date: 13/09/2016 8:55AM
Last updated: 13/09/2016 8:55AM (Mark)
Share article: 
Author: Mark
database | mongodb | nedb | connection |