以nodejs为例
1,本地proj => github; 确保root directory下有package.json
terminal cd 到目标文件下
git init git branch -M main git remote add origin https://github.com/pear2020/hekorutest_2.git git add * git commit -m "add all" git push -u origin main
如果需要password:
(1)github -> setting -> developer setting -> personal access Token -> generate, take "XXXXXXXXXXXX" as your password
(2)添加到windows凭据(credentials): 控制面板\用户帐户\凭据管理器 -> windows凭据 -> 添加普通凭据,输入username+password(Token)
2, heroku
https://dashboard.heroku.com/apps/test02-8110/deploy/github
对应代码中: const sClientID = process.env.SB_CLIENT_ID
3、 deploy 成功