Table of Contents
Hey! Welcome to Blog Gen! This is just a blog web application I built from learning how to develop full-stack applications. I was able to learn how the front-end and back-end interact along with a database, and it's turned out very well!
This web app uses Node.js for backend. I have used Express.js for serving static files, using middlewares and generating URL's for blogs with routes. The main part of the app is based on EJS, which is a template engine. As soon as you publish the blog, it gets saved on the MongoDB database with Mongoose and a new div
is generated for your blogs. A new URL is also generated, as /posts/your-title
by which you can access your blog. The compose blog page can be found at /compose/
. All the blogs are saved on a MongoDB database, which is served with MongoDB Atlas service. All these CRUD operations are carried out on MongoDB with Mongoose.
-
A JavaScript runtime built on v8 engine.
-
A Node.js web application framework that provides a robust set of features for web and mobile applications.
-
The most popular NoSQL database.
-
A templating language that lets you generate HTML markup with plain JavaScript.
-
The world’s most popular framework for building responsive, mobile-first sites, with BootstrapCDN and a template starter page.
You can try out Blog-Gen by going here: (https://stormy-sands-79797.herokuapp.com/)
If your want to try this app on your local machine, follow these steps:
-
Clone this repository in your local environment by the following command:
git clone https://github.com/sidchopra13/Blog-Gen.git
-
Use NPM (Node Package Manager) to install dependencies for this project.
npm install
-
Use MongoDB Atlas service to set up your database on the cloud.
-
Use a
.env
file for storing the url containing username and password of your MongoDB Atlas database. The variables for these are:
MONGO_URL
-
Now use Node.js to start the chat application:
node app.js
-
Go to
localhost:3000
on your browser. This is the homepage of Blog-Gen. You can read blogs from here and clickRead more
to, well, read more! -
Now you can go to the Compose button to publish your own blog. Your blog will be visible on the homepage, where you will also find a link to the dynamically created page and URL for your blog.
This project was initially started as a course-along project which I made to learn Node.js and Express.js
Improving UI is the next step for this application. You can expect register and login functionality in next version of this web application. I would also like to hear any reviews, feedback or suggestions from you!
Siddharth Chopra - @sidchopra49
Project Link: https://github.com/sidchopra13/Blog-Gen