From 0a674618191563653666f9efafe875b554fdf1d7 Mon Sep 17 00:00:00 2001 From: Chigozirim Igweamaka Date: Sun, 4 Aug 2024 22:52:08 +0100 Subject: [PATCH] Update README.md --- README.md | 70 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index f21a47f..6940f00 100644 --- a/README.md +++ b/README.md @@ -41,9 +41,43 @@ npm install ``` ## Usage :bicyclist: -#### ▸ Setup MongoDB 🍃 + +#### ▸ Start the Client App +``` +# Assuming you're in the client directory: + +npm start +``` +#### ▸ Start the Backend App +In a separate terminal window: +``` +cd seek-tune +go run *.go serve [-proto (default: http)] [-port (default: 5000)] +``` +#### ▸ Download a Song +Note: A link from Spotify's mobile app won't work. You can copy the link from either the desktop or web app. +``` +go run *.go download +``` +#### ▸ Save local songs to DB (supports all audio formats) +``` +go run *.go save [-f|--force] +``` +The `-f` or `--force` flag allows saving the song even if a YouTube ID is not found. Note that the frontend will not display matches without a YouTube ID. -To configure the database connection, you need to set the following environment variables: +#### ▸ Find matches for a song/recording +``` +go run *.go find +``` +#### ▸ Delete fingerprints and songs +``` +go run *.go erase +``` +#### ▸ Setup MongoDB 🍃 + +SQLite is used as the default database; however, you can switch to MongoDB if desired. +To configure the database connection for MongoDB, set the following environment variables: +- `DB_TYPE` = `"mongo"` - `DB_USER`: The username for the MongoDB database. - `DB_PASS`: The password for the MongoDB database. - `DB_NAME`: The name of the MongoDB database. @@ -52,38 +86,6 @@ To configure the database connection, you need to set the following environment The database connection URI is constructed using the environment variables. If the `DB_USER` or `DB_PASS` environment variables are not set, it defaults to connecting to `mongodb://localhost:27017`. - -#### ▸ Start the Client App 🏃‍♀️‍➡️ -``` -# Assuming you're in the client directory: - -npm start -``` -#### ▸ Start the Backend App 🏃‍♀️ -In a separate terminal window: -``` -cd seek-tune -go run *.go serve [-proto (default: http)] [-port (default: 5000)] -``` -#### ▸ Download a Song 📥 -Note: A link from Spotify's mobile app won't work. You can copy the link from either the desktop or web app. -``` -go run *.go download -``` -#### ▸ Save local songs to DB (supports all audio formats) 💾 -``` -go run *.go save [-f|--force] -``` -The `-f` or `--force` flag allows saving the song even if a YouTube ID is not found. Note that the frontend will not display matches without a YouTube ID. - -#### ▸ Find matches for a song/recording 🔎 -``` -go run *.go find -``` -#### ▸ Delete fingerprints and songs 🗑️ -``` -go run *.go erase -``` ## Example :film_projector: Download a song