Giter VIP home page Giter VIP logo

video-streaming-site-backend's Introduction

Video Streaming Site Backend

Welcome to the backend server for our video streaming site! The server is made with Express.js and MongoDB Aggregation pipelining. Mongoose was the framework used for data models and it follows the MVC pattern structure to provide a robust platform and secure server for users to interact with video content, create playlists, engage in community discussions, and much more.

Table of Contents

Features

Our backend server offers the following features:

  • User authentication: Users can sign up, log in, and manage their accounts securely.
  • Users can also subscribe to other channels or become a channel.
  • Video upload: Users can upload videos to the platform using the Multer library.
  • CRUD operations on videos: Users can create, read, update, and delete videos.
  • Uploaded videos, avatars, and cover-photos are stored publicly using Cloudinary.
  • Playlist management: Users can create playlists, add videos, and manage playlist contents.
  • Community posts: Users can create posts, engage in discussions, and interact with other users' posts.
  • Comments and likes: Users can comment on videos, and posts, and engage with content by liking them.
  • Use of cookies and JWT for added security measures.

Prerequisites

Before setting up the server, ensure you have the following prerequisites:

  • Node.js and npm installed on your system.
  • MongoDB installed and running.
  • An internet browser for testing API endpoints (e.g., Postman).

Installation

To install the backend server, follow these steps:

  1. Clone the repository:
git clone https://github.com/yourusername/video-streaming-backend.git
  1. Navigate to the project directory:
cd video-streaming-backend
  1. Install dependencies:
npm install
  1. Configuration Before running the server, you need to configure the environment variables. Create a .env file in the root directory of the project and add the following variables:
PORT = 8000
MONGODB_URI = mongodb://localhost:27017
CORS_ORIGIN= <congifure your sites>
ACCESS_TOKEN_SECRET= <add an access token, example: SUPERSECRET1234>
ACCESS_TOKEN_EXPIRY= <add an expiry date, example : 1d>
REFRESH_TOKEN_SECRET= <add a refresh token of your own>
REFRESH_TOKEN_EXPIRY= <add an expiry date, example: 10d>

#create a cloudinary account of your own and add the credentials accordingly.

CLOUDINARY_CLOUD_NAME= <cloudinary name>
CLOUDINARY_API_KEY= <paste it from your cloudinary account>
CLOUDINARY_API_SECRET= <paste it from your cloudinary account>

Usage

To start the server, run the following command:

npm start

Once the server runs, you can start making API requests to interact with the platform.

RESTful APIs

The backend server follows RESTful API principles, allowing the front-end to make proper calls to the server. The API URL's can be accessed in the routes folder of each collection type.

video-streaming-site-backend's People

Contributors

saif-gitreps 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.