Giter VIP home page Giter VIP logo

nodeblog's Introduction

NodeBlog

Blog Website

Description

This is a blog website built using Node.js and EJS. It allows users to create, read, update, and delete blog posts.

Prerequisites

Before you can run this application, you'll need to have the following software installed on your computer:

  • Node.js
  • npm
  • MongoDB Atlas account

Installation

Node.js

You can download and install Node.js from the official website.

npm

npm is included with Node.js, so once you have Node.js installed, you should have npm installed as well. You can check if npm is installed by running the following command in your terminal:

Copy code

npm -v

If you see a version number printed to the console, then npm is installed.

MongoDB Atlas

This application uses MongoDB Atlas to store blog post data. You can create a free account at the MongoDB website.

Once you have an account, follow these steps:

  1. Create a new project and a new cluster.
  2. Create a new database and a new collection for your blog posts.

Configuration

Before you can run the application, you'll need to configure it with your MongoDB Atlas credentials.

  1. Create a new file named .env in the root directory of the project.
  2. Open the .env file in a text editor and add the following lines:

makefileCopy code

MONGODB_URI=<your-mongodb-uri>

  1. Replace <your-mongodb-uri> with your MongoDB Atlas connection string. You can find your connection string by following these steps:

    1. Log in to your MongoDB Atlas account.
    2. Navigate to the cluster that you created earlier.
    3. Click the "Connect" button.
    4. Select "Connect your application".
    5. Select "Node.js" as the driver and "3.6 or later" as the version.
    6. Copy the connection string that is displayed on the page.

    Your connection string should look something like this:

    Copy code

    mongodb+srv://<username>:<password>@<cluster-name>.mongodb.net/<database-name>?retryWrites=true&w=majority

  2. Save the .env file.

Running the Application

To run the application, follow these steps:

  1. Clone the repository to your local machine.

  2. Open a terminal window and navigate to the project directory.

  3. Run the following command to install the required dependencies:

    Copy code

    npm install

  4. Run the following command to start the application:

    sqlCopy code

    npm start

  5. Open your web browser and navigate to http://localhost:4000 to view the application.

Built With

  • Node.js
  • Express
  • EJS
  • MongoDB Atlas

Authors

nodeblog's People

Contributors

sandokansaruhan 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.