Coder Social home page Coder Social logo

sugiravinc / summative-project---devops-node.js Goto Github PK

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

DevOps summative project for the first last trimester.

Home Page: https://summative-project-devops-node-js-1.onrender.com

JavaScript 99.24% Dockerfile 0.76%

summative-project---devops-node.js's Introduction

Blogging System API

Overview

This project is a Node.js based blogging system API that provides essential functionalities required for managing a blogging platform. It includes features such as user authentication, basic models for data management, and CRUD (Create, Read, Update, Delete) operations.

Features

  • User Authentication: Implemented secure authentication mechanisms to protect user data and control access.
  • Basic Models: Defined fundamental data models to manage various entities within the blogging system.
  • CRUD Operations: Comprehensive support for Create, Read, Update, and Delete operations to manage content effectively.

Technologies Used

  • Node.js: JavaScript runtime used to build the backend of the application.
  • Express.js: Frameworks used to structure the application, providing a clean and maintainable architecture.
  • MongoDB: NoSQL database for storing data.
  • JWT: JSON Web Tokens for secure user authentication.
  • Mongoose: MongoDB object modeling tool designed to work in an asynchronous environment.
  • Jest: JavaScript testing framework for unit and integration tests.

Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/SugiraVinc/Summative-Project---DevOps-Node.js.git
    cd Summative-Project---DevOps-Node.js
    
  2. Install dependencies:

    npm install
  3. Create a .env file in the root directory and add the following environment variables:

    PORT=3000
    MONGODB_URI=mongodb://localhost:27017/blogging-system
    JWT_SECRET=your_jwt_secret
    NODE_ENV=development
  4. Start the development server:

    npm run dev
  5. Run tests:

    npm test

API Endpoints

  • Authentication

    • POST /api/users/register - Register a new user
    • POST /api/users/login - Authenticate a user and retrieve a token
  • Blog Posts

    • GET /api/blogs - Retrieve all blog posts
    • POST /api/blogs/create - Create a new blog post
    • GET /api/blogs/:id - Retrieve a single blog post by ID
    • PUT /api/blogs/edit/:id - Update a blog post by ID
    • DELETE /api/blogs/delete/:id - Delete a blog post by ID

Contributing

We welcome contributions from the community. To contribute, follow these steps:

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature/your-feature-name.
  3. Make your changes and commit them: git commit -m 'Add some feature'.
  4. Push to the branch: git push origin feature/your-feature-name.
  5. Open a pull request.

CI - CD

Used GitHub Actions to automate build, test, and deploy.

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.