B_12
B_12

Reputation: 183

How to deploy a React website via Vercel or Surge?

Although it seems like I was able to deploy the website successfully (which was built with React), as soon as I click on the deployed link, the browser takes me back to localhost:3000. I assume it's because I've set redirectUri as the following const redirectUri = "http://localhost:3000/callback/";, but I am not sure howelse I could set the redirectUri. Can someone help me with this issue please?

Here is the surge link : www.spotify_playlist_jammming.surge.sh

Upvotes: 0

Views: 314

Answers (2)

paulogdm
paulogdm

Reputation: 1801

Take a look at "VERCEL_URL" as an environment variable: https://vercel.com/docs/v2/build-step#system-environment-variables

You can then use something like REACT_APP_URL=$VERCEL_URL

Upvotes: 1

Nicky McCurdy
Nicky McCurdy

Reputation: 19564

You need to set redirectUri to a callback route in http://www.spotify_playlist_jammming.surge.sh

Upvotes: 1

Related Questions