A free and open-source headless CMS built with Node.js and MongoDB
- The
/dbfolder for themongodbdocker volume has been moved, along with all other docker related files, to the/dockerfolder. After you pull the latest changes, make sure to manually move your/dbfolder to/docker/dbbefore you restart the container. - The
/pluginsfolder has been unversioned, so please remove all content in this directory (except for custom plugins you want to keep, of course)
First make sure you have these dependencies met:
- node.js
- mongodb
- imagemagick
- optional:
- docker & docker-compose
- nodemon
Then clone the code and install the dependencies:
git clone https://github.com/HashBrownCMS/hashbrown-cms.git -b stable --single-branch --recursive
cd ./hashbrown-cms
npm install
Building and starting the server for production:
npm start
Building/watching frontend files:
npm run build:frontend
npm run watch:frontend
Using Docker:
npm run start:docker
npm run watch:docker
npm run stop:docker
Using nodemon:
npm run watch:nodemon
To update the core HashBrown version and all of its dependencies:
npm run update
Or manually:
cd /to/your/hashbrown/dir
git pull
git submodule update --recursive --init
npm install
webpack
Remember to restart the server after updating (see "Running HashBrown" above)
Using environment variables:
MONGODB_HOST: host(s), split by comma, default value islocalhostMONGODB_PORT: port(s), split by commaMONGODB_USERNAME: usernameMONGODB_PASSWORD: passwordMONGODB_PREFIX: database name prefix, default value ishb_MONGODB_OPTIONS: connection options, JSON string containing key/value pairs.
Using /config/database.cfg
{
"host": "host" | ["host1", "host2"] | "host1,host2",
"port": "port" | [port1, port2] | "port1,port2",
"username": "<username>",
"password": "<password>",
"prefix": "<database name prefix>",
"options": {
"<key>": "<value>",
...
}
}
If you'd like to contribute to HashBrown development, you can make a pull request to our repo or contact us about becoming a collaborator
Matrix: #hashbrowncms:matrix.org
If you have questions, bug reports or anything else of the sort, please use the issue tracker