Skip to content

Commit

Permalink
Merge pull request #20 from cis3296s24/nina-perone-patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
tun82434 authored Apr 13, 2024
2 parents 26f802f + 6229997 commit fa878fa
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -23,23 +23,28 @@ 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)
- http://[serverIP]:3000/callback

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.


0 comments on commit fa878fa

Please sign in to comment.