Skip to content

wrathgod01/Blog-Website

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blog Website

Project By Hitik Saini

Start your Blog today! Here you will find a node.js coded back-end and ejs coded front-end for your personal/community blog. This is a prototype for a sample Blog Website.

Prerequisite

Install latest version of nodejs & mongoDB(database) into your PC for this to work. I have explained the installation process below refer to it and when you're done. You now just need to open terminal and write these commands:

Installation Guide: Node.js | Express.js | MongoDB

Node.js on Windows : Download

Installation Steps

  • Download the Windows installer from the Nodes.js® website
  • Choose the LTS version that’s shown on the left.
  • Run the installer (the .msi file you downloaded in the previous step.)
  • Follow the prompts in the installer (Accept the license agreement, click the NEXT button a bunch of times and accept the default installation settings).
  • Restart your computer. You won’t be able to run Node.js® until you restart your computer.
  • Confirm that Node has been installed successfully on your computer by opening a Hyper terminal and typing in the commands

node --version

You should see the version of node you just installed.

Node.js on Mac : Download

Installation Steps

  • Download the Mac installer from the Nodes.js® website.
  • Choose the LTS version that’s shown on the left.
  • Run the installer (double-click on the .pkg file you downloaded in the previous step.)
  • NOTE: If you are running macOS Catalina 10.15, you might get a warning pop up
  • To solve this issue, just right click (hold down the control key on the keyboard and click) on the .pkg file and select "Open With" and then select "Installer (default)".
  • Follow the prompts in the installer (Accept the license agreement, click the NEXT button a bunch of times and accept the default installation settings).
  • Confirm that node has been installed successfully by opening a Hyper terminal and entering the command

node --version

You should see the version of node you have just installed.

Express is a framework for Node.js it can be used by using npm package.

npm install express

MongoDB Installation

Download the msi file based on your platform(windows, mac, linux etc) Download

Install

  • Select the latest version and click download.
  • After downloding the file double click it, and install it in complete mode.
  • Note the data directory I recommend you not to change and keep it default.
  • Uncheck Install mongodb compass, we don't need it for now.
  • Click Install now.

Configure

After successfully installing the latest version you need to configure the database to use it.

  • Navigate to your C:// drive or /home in linux
  • Create a folder and name it "data" (make sure to name it exactly)
  • Now make another folder inside this folder named "db" (make sure to name it exactly) The path should now appear like this:

C:\data\db

Now set alias to your database based on your database directory in your C drive.

  • cd ~
  • touch .bash_profile
  • now open this bash file and set alias (mongo = "just paste the directory")

Here is the official document which guide you step by step for installing mongoDB locally. Refer to this: https://docs.mongodb.com/guides/server/install/

You can always contact for any help😉

About

Start your Blog today!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 52.9%
  • JavaScript 35.2%
  • CSS 11.9%