Skip to content

Demon-Sheriff/videofileApi-backend

Repository files navigation

Video Management API

Description

This project is a Node.js application for managing video operations, including uploading, trimming, and merging videos using Express.js and Sequelize.

Setup Instructions

Prerequisites

  • Node.js (version 14.x or higher)
  • npm (Node Package Manager)

Installation

  1. Clone the repository:
    git clone https://github.com/yourusername/video-management-api.git
    cd videofileApi-backend
  2. Install the dependencies:
    npm install
  3. Set up the database (adjust configuration as needed in config/config.json):
npx sequelize db:create
npx sequelize db:migrate

Running the API server

  • To start the API server, run:
    nodemon app.js

API Endpoints

  • POST /video/upload: Upload a video.
  • POST /video/trim: Trim a video.
  • POST /video/merge: Merge multiple videos.
  • POST /video/generateLink: Generate an expiring link for a video.

API Documentation

  • To view the API documentation, start the server
    nodemon app.js
  • Open your web browser after starting the server
  • Navigate to swagger UI: Go to the following URL:
    http://localhost:YOUR-SERVER-PORT/api-docs

Additional Notes

  • Make sure to have ffmpeg installed on your system for video processing functionalities to work.
  • For file uploads, you can use tools like Postman or cURL.

Areas for Improvement

  • If given more time, I would enhance error handling, add input validation, and implement testing for more robust functionality.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

video file transfer sharing mock apis written in node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published