Giter Site home page Giter Site logo

muslimshah / blogsapi Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 143 KB

The BlogsAPI allows users to create accounts, post blogs, view other users' blogs, and comment on them. Users can register, log in, and create their own blog posts. They can also browse and read blogs posted by other users. Additionally, users can leave comments on blog posts, promoting interaction and discussions among users.

Home Page: https://blogs-api-ebon.vercel.app

JavaScript 11.45% HTML 88.55%
api blog express mongodb mongoose blogs-api

blogsapi's Introduction

Blogs API

Author

Muslim Shah

Date

May 28, 2023

Description

Blogs API in which users can create an account, login, create a blog, update a blog, delete a blog, read their own and others' blogs, comment on a blog, and delete their comments.

Getting Started

These instructions will get you a copy of the project up and running on your local machine.

Prerequisites

  • Node.js
  • MongoDB

Installation

  1. Clone the repository:
    git clone https://github.com/muslimshah/BlogsAPI.git
    
  2. Install the dependencies:
    npm install
    
  3. Configure the environment variables:
    • Create a .env file in the root directory and add the following:
      MONGODB_URI=<your MongoDB connection string>
      JWTSECRET=<your secret key for JWT>
      JWTLIFETIME=<jwt life time>
      
  4. Start the development server:
    npm start
    

Official Documentation

For more detailed information, refer to the official documentation.

Security Packages Used

  • helmet: Provides various security-related HTTP headers.
  • cors: Enables Cross-Origin Resource Sharing (CORS) for handling requests from different domains.
  • xss-clean: Prevents Cross-Site Scripting (XSS) attacks by sanitizing user input.
  • express-limiter: Implements rate limiting to protect against brute force and denial-of-service attacks.

Error Handling

  • express-async-errors: Handles asynchronous errors in Express middleware and routes.

blogsapi's People

Contributors

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