스포티파이 api 사용하기 2(vite)

김서연·2024년 9월 19일

Spotify API

목록 보기
4/5
  1. https://github.com/spotify/web-api-examples/tree/master/get_user_profile
    스포티파이 깃허브에서 폴더 내려받기

    사용하는건
    ./src 폴더의
    script
    index
    authCodeWithPkce

    입니다.
    다른건 필요 없음!

  2. /src/script.ts에서 Client ID 수정해주기(대시보드에서 가져오세요)

  3. vite 설치하기

npm create vite@latest spotify-profile-demo -- --template vanilla-ts
cd spotify-profile-demo
npm install
npm run dev

기본 데모에 있는 vite 페이지는 삭제하기 (public 폴더와 기본 index)
1번에서 다운받은 파일을 이때 쓰면 됩니다.

  1. 터미널에서 npm run dev

테스트폴더입니다. 다운로드 후 확장자를 .zip으로 바꿔주세요

profile
https://velog.io/@tidchron 으로 이전

0개의 댓글