A simple REST API for CRUD operations to recieve streamed videos save them in chunks the finalize the video compilation then send the video-url to the compiled video. Resources using Node.js, Multer, Blob, Express, MongoDB, and Mongoose.
Before you begin, ensure you have met the following requirements:
- IDE- Vscode or any suitable.
- Node.js and npm installed.
- MongoDB installed and running.
- Postman or a similar tool for API testing.
-
Clone the repository:
git clone https://github.com/Okafor-Ifeanyi/HNG-Stage-5
-
Change to the project directory:
cd your-api-repo
-
Install dependencies:
npm install
- Create a .env file in the root directory of your project and add the following environment variables:
MONGO_URI= ? your_mongodb_uri_here PORT= ? your_desired_port_here DEEPGRAM_API_KEY= ? your_desired_port_here
MONGO_URI=your_mongodb_uri_here
PORT=your_desired_port_here
DEEPGRAM_API_KEY= ? your_desired_port_here
-
Create a new session:
POST /api/createSession
-
Upload video CHunk to session:
POST /api/createSession
-
finalize session:
POST /api/finalize-session
-
Get specific Session by sessionID:
GET /api/:info
-
Get all Session Video URL:
PATCH /api/:id
Use Postman or your preferred API testing tool to test the CRUD operations. Here's a sample Postman collection you can import: Postman Collection.
This Docs contains an extensive documentation with the following features
- Standard formats for requests and responses for each endpoint.
- Sample usage of the API, including example requests and expected responses.
- Any known limitations or assumptions made during development.
- Instructions for setting up and deploying the API locally or on a server.
Contributions are welcome! Feel free to open issues or submit pull requests.
This project is licensed under the MIT License.
Copyright (c) 2023 Prog BIO