GithubHelp home page GithubHelp logo

blog-site's Introduction

blog-site

This is a test blog-site v1.

It consists some default blog posts and you can add more info by going to the /compose route

It is not hosted on a Web server though.

So, you need to host the website locally on port 3000.

Blog Website Readme file

This is a blog website which is an online journal where an individual, group, or corporation presents a record of activities, thoughts, or beliefs.

How to run the server

Here, we need to setup two local servers. One for the database and one for the website backend.

Steps to setup database:

  1. Install MongoDB by visiting the official website (https://www.mongodb.com/try/download/community) and downloading the latest community installer. You need to sign up first to be able to download.
  2. After installing MongoDB, you need to create a directory /data/db exactly with the same name (case sensitive) so that the database will be stored inside that directory.
  3. Create a .bash_profile folder in the root directory and edit it using vim editor and insert alias mongod="/c/Program\ Files/MongoDB/Server/5.0/bin/mongod.exe" and alias mongo="/c/Program\ Files/MongoDB/Server/5.0/bin/mongo.exe"
  4. Run the command mongod which then starts the server on localhost:27017
  5. Now run command mongo to open the MongoDB shell.

Steps to setup local server:

  1. Download and install NodeJS in the official website (https://nodejs.org/en/download/).
  2. Run the command npm init which initializes the web directory structure and adds the node modules.
  3. Now delete all the folders except node modules and paste all the codes using the same directory structure as provided.
  4. Install the library files required by using command npm i express ejs lodash mongoose
  5. Now you can run the server by using command node app.js which in turn runs the website on localhost:3000

blog-site's People

Contributors

karthik192 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.