A minimal blog site.
- express
- ejs
- bootstrap
- mongoDB Atlas
- Display posts
- Add posts
- Remove posts
git clone https://github.com/millionhz/minimal-journal.git
The app requires:
- PORT (port to run the server on)
- DB (database url)
- NODE_ENV
For development, nodemon config file can be used to set the environment variables.
Sample nodemon.json
:
{
"ext": "js,json",
"env": {
"PORT": 3000,
"DB": "mongodb://127.0.0.1:27017/minimal_blog",
"NODE_ENV": "development"
}
}
npm install
Note: If NODE_ENV is set to production, npm
will not install devDependencies.
Production:
npm start
Development:
npm run dev