Files
music-portfolio/README.md
2026-04-27 22:16:45 -05:00

1.7 KiB
Raw Blame History

Music Portfolio

This project hosts a music portfolio with a Node.js backend serving music files and a React frontend displaying tracks. This guide explains how to run everything locally, convert music files to MP3, transfer files to your server, and set up the server with Nginx and SSL.


Table of Contents

  1. Prerequisites
  2. Local Setup
  3. Convert Music to MP3
  4. Deploy to Server
  5. Server Setup
  6. Nginx Configuration

Prerequisites

  • Node.js (v18+ recommended)
  • npm / yarn
  • Python3 + pip
  • pydub Python library (for conversion)
  • ffmpeg installed on both local and server machines

Install Python dependencies:

pip install pydub

Install Node dependencies in backend and frontend:

cd backend
npm install

cd ../frontend
npm install
npm run build

Local Setup

Backend

cd backend
node server.js

By default, the backend runs at:

http://localhost:3001

Frontend

cd frontend
npm start

By default, the frontend runs at:

http://localhost:3000

Convert Music to MP3

All music files must be in the backend/music folder. The project includes a Python script:

cd backend
python3 convert-to-mp3.py

This will:

  • Convert .flac, .wav, .m4a, .ogg files to .mp3
  • Delete the original files
  • Keep the same filename but with .mp3 extension

Notes

  • Make sure the backend is running before loading the frontend.
  • Frontend calls /api/tracks to fetch metadata.
  • All music files must be in .mp3 format for consistent browser support.
  • Clear browser cache if changes arent reflected immediately.