Piece Digital CMS
Getting Started
Dependencies
Install MongoDB
Follow these steps to get MongoDB installed, set up database server authentication, and set up your CMS database connection credentials.
-
Download and install MongoDB
-
Start MongoDB:
mongod
-
Connect to MongoDB server:
mongo
-
Switch to admin database:
use admin
-
Here's where you'll create the credentials used to connect to the database server when authentication is enabled.
Create admin user (has access to every database on the server)
db.createUser( { user: "<username>", pwd: "<password>", roles: [ { role: "userAdminAnyDatabase", db: "admin" }, "readWriteAnyDatabase" ] } )
-
Here's where you'll create the credentials used to connect to your CMS database.
Switch to
<your database name>
:use <your database name>
-
Create database user (for the database you want to use for the CMS)
db.createUser( { user: "<username>", pwd: "<password>", roles: [ { role: "userAdmin", db: "<database>" }, "readWrite" ] } )
-
Restart MongoDB with access control:
mongod --auth
In order to connect to the database with authentication enabled use this command and use your admin logins: mongo -u "<username>" -p "<password>" --authenticationDatabase "admin"
Install NodeJS
- Download and install NodeJS
Install the server
- Download the repo
- Install dependencies with
npm install
Start the server
- Do it:
npm start
The Dashboard
Visit the dashboard to set up your database connection info and create your first admin user.