Skip to content

About

API endpoint that accepts an MP3 file and responds with the number of frames in the file.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

20 Commits

Folders and files

Repository files navigation

MP3 FRAME COUNTER

undraw_happy_music_g6wc.svg

Javascript   Typescript   Svelte   Vite   Tailwind   Nodejs   Express.js   HTML   CSS3   Yarn   Git


Introduction

MP3 frame counter aims to provide an API endpoint that accepts an MP3 file and responds with the number of frames in the file. The endpoint should successfully count the number of frames for MPEG Version 1 Audio Layer 3 files.

Documents used:

  1. MP3 WIKI
  2. Frame Header

Development

Getting started

I assume that docker is both installed and running. https://docs.docker.com/get-docker

  1. Clone the repo
  2. Please use Yarn as a package manager
  3. Build the Docker containers
  4. Access the app via Svelte http://localhost:5173/
git clone https://github.com/paulambanks/mp3-file-analyser.git
cd mp3-file-analyser

docker compose up
# API
Express Server is running on http://localhost:3000

# SVELTE FE
Svelte app is running on http://localhost:5173

Running tests

Access API codebase and run tests

cd apps/express-api
yarn test

Interacting with the API

  1. Directly with the API (Curl) - with already existing sample or by passing a new filepath
curl -Ss -X POST http://localhost:3000/file-upload -F "file=@apps/express-api/fixtures/sample.mp3"
  1. Front-End uploader

uploader

Successful upload:

uploader-success

Errors:

uploader-errors


About

API endpoint that accepts an MP3 file and responds with the number of frames in the file.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages