A simple blog app using NodeJS, Express & MongoDB.
||||||||||||||||||||
- All the CRUD functionalities
author
,date
,post thumbnail
,summary
,comments
- SummerNote WYSIWYG Text Editor
||||||||||||||||||||
- Clone the repository
- Open terminal,
cd
on to this blog-app/ directory and run commandnpm install
to install all the required dependencies - Create your own
.env
file which will contain your mongodb atlas (cloud) database userid and password. Structure of.env
file is given below:
MONGO_USERID=johndoe
MONGO_PASS=your_password
DB_NAME=database_name
- Open
index.js
un-comment theseedDB()
function call to seed the database with sample data
// seed the database
seedDB();
- Now you can start the the development server using
npm run dev
- Now comment out the
seedDB()
function call otherwise it repeatedly insert the same data
// seed the database
// seedDB();
- Open browser and hit
localhost:3000
to view the blog
HACK IT THE WAY YOU WANT!