From 62299971265dbd18c96cdd1b22296ffd11e44cb7 Mon Sep 17 00:00:00 2001 From: nina-perone <143619402+nina-perone@users.noreply.github.com> Date: Wed, 10 Apr 2024 10:06:17 -0400 Subject: [PATCH] Update README.md added joining session directions to readme --- README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5811946..76d1aed 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Web application inspired by https://www.instagram.com/albumreceipts/. Generates The application inspired by https://receiptify.herokuapp.com/. Generates receipts on a website for a single user's spotify data. -## Running the App Locally +## Hosting the App Locally This app runs on Node.js. On [its website](http://www.nodejs.org/download/) you can find instructions on how to install it. You can also follow [this gist](https://gist.github.com/isaacs/579814) for a quick and easy way to install Node.js and npm. @@ -23,18 +23,15 @@ To do so, go to [your Spotify for Developers Dashboard](https://beta.developer.s - http://localhost:3000 (needed for the implicit grant flow) - http://localhost:3000/callback -Once you have created your app, load the `client_id`, `redirect_uri` and `client_secret` into a `config.js` file. +Once you have created your app, change the `client_id` and `client_secret` values in the a `app.js` file to your own Spotify Developer credentials. In order to run the app, open the folder, and run its `app.js` file: - $ cd authorization_code $ node app.js Then, open `http://localhost:3000` in a browser. -#### Hosting the App Locally - -To allow users to access your app, you need to add them into user managment from the Spotify for Developers Dashboard. +To allow users to access your app, you need to add their names and emails under user managment from the Spotify for Developers Dashboard. When hosting, set the Redirect URI as: - http://[serverIP]:3000 (needed for implicit grant flow) @@ -42,4 +39,12 @@ When hosting, set the Redirect URI as: Setting Redirect URI as http://localhost:3000/callback when trying to host the application for local clients to connect to will fail because the redirect URI points to the client's IP address (localhost). +## Joining the App Locally + +A user on the same network the app is hosted on can put the host's IP and port number into their browser (ex. 10.188.203.159:3000). + +The first person will click the "Create Session" button and log into their Spotify account. A Session ID will appear on the top of their receipt. + +Other users can then click "Join Session" and after entering the shared Session ID, they can log into their Spotify accounts and view the receipt. +