web application to post and read blogs with nested comment section implemented.
Design Document: Link
Demo: Hosted at Heroku
- This blog web app allow a user to post and view blogs.
- A user can also post and reply to comments in the comment section of a blog.
- There are two ways to write a blog. One way is using markdowns to write correctly aligned and size-controlled blogs. Another simple alternative should be present for users who not comfortable with markdowns.
- Additionally while writing a blog, user can preview the blog before submitting.
- Authentication for posting or liking a blog and to comment.
- Front-end: Reactjs along with Material-UI (React UI framework).
- Back-end: Nodejs, Express, Passportjs (for google authentication).
- Database: MongoDB hosted at mlab.com
- Google+ API Service: for user authentication
(The below installation guide is for on ubuntu) Install node and npm:
$ sudo apt-get install nodejs
$ sudo apt-get install npm
$ sudo ln -s /usr/bin/nodejs /usr/bin/node
$ sudo npm install -g n
After confirming that node are npm are installed. Clone this repo ( Assumming git is already installed ):
$ git clone https://github.com/Mohit-Nathrani/Blog_WebApp.git
after cd <repo_dir> there is a file server/config/keys.js inside that input
- mongodb database link link
- CookieKey (anything ex:"RandomKey")
- Go to https://console.developers.google.com create a project and get clientId, clientSecret for authentication using google+ api there provide Authorized JavaScript origins : http://localhost there also provide Authorized redirect URIs: http://localhost:3001/auth/google/redirect after getting keys put them in key.js
Now we will start the server:
$ cd server
$ npm install
$ node index
if everything is okay, this text will come on terminal:
server listening....
connection successful
Now in another terminal (from repo dir):
$ cd client
$ npm install
$ npm start
This step will open ( localhost:3000 ) in browser.
Free Software, Hell Yeah!