Skip to content

It helps to create authenticate blog posts, and users can also comments the specific posts.

License

Notifications You must be signed in to change notification settings

paalamugan/cms-blog

Repository files navigation

CMS BLOG

  • It helps to create authenticate blog posts, and users can also comments the specific posts.

Get Started

Default Login credentials

username - admin

password - admin

One Time Only in Linux OS

  • Install mongodb
sudo apt install mongodb-org
  • Please Make sure whether your mongodb server running or not. before start the app
sudo systemctl start mongod

Alternative

  • If you have docker machine, run below command to start a mongodb server
docker-compose up -d

Node Engine

  • node - v14.5.3
  • npm - 6.14.9

Install Dependencies

  • If you have nvm package, just use below command to switch node engine
nvm use
  • Install node_modules packages
npm install && npm run client:install

Development

cp -rf .env-example .env

After that you have to replace your environment variable inside .env file.

  • .env file look like this,
ADMIN_USERNAME=<your admin name> // default "admin"
ADMIN_PASSWORD=<your admin password> // default "admin"
MONGODB_URI=<your mongodb uri> // default "mongodb://localhost/cms-blog"
COOKIE_SECRET_KEY=<your cookie secret key> // default "mycookiesecret"
SESSION_SECRET_KEY=<your cookie secret key> // default "mysessionsecret"
JWT_SECRET_KEY=<your jwt secret key> // default "myjwtsecret"
FACEBOOK_CLIENT_ID=<Your facebook client id>(Optional)
FACEBOOK_CLIENT_SECRET=<Your facebook client secret key>(Optional)
GOOGLE_CLIENT_ID=<Your google client id>(Optional)
GOOGLE_CLIENT_SECRET=<Your google client secret key>(Optional)
S3_ACCESS_KEY=<your s3 access key>(Optional)
S3_SECRET_ACCESS_KEY=<your s3 secret access key>(Optional)
  • If you want to start a both backend and frontend simultaneously in single command, use below command
npm run dev
  • For server(Run only in backend)
npm run server
  • For client(Run only in frontend)
npm run client

Production

  • Start a production server
npm run prod