Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KKBox Developer 上線啦 #3

Open
Yukaii opened this issue Oct 28, 2017 · 10 comments · May be fixed by #5
Open

KKBox Developer 上線啦 #3

Yukaii opened this issue Oct 28, 2017 · 10 comments · May be fixed by #5

Comments

@Yukaii
Copy link
Owner

Yukaii commented Oct 28, 2017

https://www.facebook.com/InnovationChat/posts/1955875698001396

有機會直接串 API 吧

@Yukaii
Copy link
Owner Author

Yukaii commented Oct 28, 2017

看起來用 AWS Lambda 之類的弄比較清爽

@Yukaii
Copy link
Owner Author

Yukaii commented Feb 23, 2018

聽說 Lambda 每個月一百萬次 request 免費呢,真是便宜 w

實作細節

  • 直接用 KKBox node api client 啦
  • 然後 token 開 redis 存,redislab 也有 30MB 免費版,一整個經省路線
  • 然後用 serverless 框架來寫

先從參考強者我朋友的 https://github.com/zetavg/Feedify 開始吧喔耶

然後繼續 typescript 大法好

@Yukaii Yukaii linked a pull request Feb 24, 2018 that will close this issue
1 task
@Yukaii
Copy link
Owner Author

Yukaii commented Feb 24, 2018

#5 進行中

@Yukaii
Copy link
Owner Author

Yukaii commented Feb 24, 2018

還需要:

  • 整理 Mp3tag 支援的欄位
  • Hacking Guide (文件),最後再弄了

@Yukaii
Copy link
Owner Author

Yukaii commented Feb 24, 2018

@Yukaii
Copy link
Owner Author

Yukaii commented Feb 25, 2018

這輩子最恨 Legacy code 的時候。

cd4f96e workaround JSON 產生的方式,注意分號和逗號後面都需要有空格:

解析失敗:

{"key":"value","key2":"value2"}

解析成功:

{"key": "value", "key2": "value2"}

而且就只有這樣才能過,stringify with indent 也不行,馬的幹!浪費一堆時間

@Yukaii
Copy link
Owner Author

Yukaii commented Feb 26, 2018

大致都搞定了,目前進度卡在自訂網域的設定

@Yukaii
Copy link
Owner Author

Yukaii commented Mar 18, 2018

來還債了,就這樣放了又三週 XDD

自訂網域比預期難搞,因為我又不想全面移轉 route 53,想繼續用 Cloudflare

  1. 先照著這個弄完:http://www.leanx.eu/tutorials/set-up-amazons-api-gateway-custom-domain-with-cloudflare ,拿到 keypair 和 Cloudflare 的 Root CA
  2. 去 AWS Certificate 匯入憑證,https://console.aws.amazon.com/acm/home?region=us-east-1 ,注意要選 us-east-1,Edge domain 才拿得到
  3. 去建好的 API Gateway 建立 Custom domain,照著填一填
  4. 等拿到 cloufront domain 之後去 clouflare 設 cname alias
  5. 等,要四十分鐘 cloudfron 才會跑完
  6. Cloudflare page rules 的 ssl 也要開

@Yukaii
Copy link
Owner Author

Yukaii commented Mar 19, 2018

結果上完 Cloudflare https 之後換 mp3tag 無法連接...

screen shot 2018-03-19 at 10 12 30 am

直接打又正常

image

用 SSLLabs 測試也沒問題

https://www.ssllabs.com/ssltest/analyze.html?d=kkmp3.yukaii.tw

@Yukaii
Copy link
Owner Author

Yukaii commented Mar 19, 2018

先用 lambda 醜醜的網址發佈算了?還是在買一個網域專給 route 53 管...

繼續放置吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant