#javascript #node.js #reactjs #localhost #spotify
#язык JavaScript #node.js #реагирует на #локальный хост #spotify
Вопрос:
i cloned https://github.com/espitiaandres/studyfi and i want to run it in local. i have made my account on spotify developer and took redirecturi and client id and wrote in config.js but localhost is refusing to connect ```const authEndpoint = "http://accounts.spotify.com/authorize"; // const clientId = "53bcecd410634483b53########"; const clientId = "e6690d4f0b734a6c89336c#######"; const redirectUri = "http://localhost:8080/callback"; // dev redirectUri // const redirectUri = "https://www.andres-espitia.com/studyfi/"; // prod redirectUri const scopes = [ "user-top-read", "user-read-currently-playing", "user-read-playback-state", "user-modify-playback-state", "playlist-read-private" ]; export { authEndpoint, clientId, redirectUri, scopes }``` in app.js the following code is written app.js const getCurrentlyPlaying = (token) =gt; { axios({ method: 'get', url: 'https://api.spotify.com/v1/me/player', headers: { 'Authorization': `Bearer ${token}` } }).then(({ data }) =gt; { if(!data) { setData(data); return; } token.js
в знак благодарности.js написан следующий код , вероятно, тоже ошибка авторизации . экспорт const setToken = (токен) =gt; ({ тип: ‘SET_TOKEN’, токен });
export const startSetToken = (token = "") =gt; { return (dispatch, getState) =gt; { return dispatch(setToken(token)); } }
получение этой ссылки после нажатия кнопки войти http://localhost:8080/callback#access_token=BQBR6jxgnBEWYYIuRjsvnxkQ-RqzVFRZ7JR1Q_9F3XWHhExQ7EaWTTj1z5ZzHXu2onRE8xRvRBHWz0qCB5Z776gHfejbXogxvkwaXDQgZGGFb4ezvHSM_87Ofy9wfZJD1_DZkehZ9NeEMehXeDShZaOVFo4DL-hMfaWNcDa9oQTQz-tJ-7UZcjiwamp;token_type=Beareramp;expires_in=3600
как это исправить и запустить этот проект на моем локальном