メモ
sudo apt-get install build-essential procps curl file git /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
その後Run these commandsの2つ実行
sudo apt-get install build-essential procps curl file git /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
その後Run these commandsの2つ実行
examples/docker at master · actix/examples · GitHub
をクローンして、examples/dockerの中で作業する
App Runnerのデフォルトドメインを叩いて、ローカルと同じ挙動にする
curl [デフォルトドメイン]; curl [デフォルトドメイン]/again Hello world!Hello world again!
1 ECRにactixのDockerイメージを登録(CLIで済ませる)
2 AppRunnerでECRを指定(コンソールで設定する)
actixapprunnerという名前でECRレポジトリ作成
aws ecr create-repository --repository-name actixapprunner
この結果でJSONで表示される"repositoryUri"を使います
ECRにログイン
aws ecr get-login-password --region ap-northeast-1 | docker login --username AWS --password-stdin [repositoryUri]
actixapprunnerというタグ付けでビルド
docker build -t actixapprunner .
タグの関連付け
docker tag actixapprunner:latest [repositoryUri]/:latest
push
docker push [repositoryUri]:latest
App Runnerコンソール
->リポジトリタイプ: コンテナレジストリ
->プロバイダー: Amazon ECR
->イメージURI: 作成したイメージを選択
->その他はデフォルトで作成
curl [デフォルトドメイン]; curl [デフォルトドメイン]/again Hello world!Hello world again!
雷雨の中私用で外出てから何故か鼻水が止まりません、不思議ですね。
Rustでバックエンドやりたいになっていて、Dockerのexampleを見つけました。
明日これをawsにのせていい感じにしたい。
examples/docker at master · actix/examples · GitHub
Packtでずっと気になっていたBabylon.jsの本がEarly Access可能になったのでそれも読みたい。
jsとmaintanableってタイトルから矛盾してるじゃねーか!!と思うかも知れませんが, Babylon自体はTSで書かれてるという旨も説明ありました。
ciのyamlで
with: node-version: 16
を追加するだけでなく package.jsonでも
"engines": { "node": "^16.10.0" },
の指定が必要だった
こんなエラーが出て、ぐぐったらnode14やめてバージョン上げたら解決した、という投稿を見かけたため
> Build error occurred SyntaxError: Unexpected token '||=' at Loader.moduleStrategy (internal/modules/esm/translators.js:145:18) { type: 'SyntaxError' }
さすがマイクロソフトだなって僕の中のろいさんが言ってました
Nextで生やしたapi/にstripe-hooks生やしたメモ
stripe自体の設定は済んだ状態から、Webhookでイベント(契約、購入など)を受け取れるようにした
開発者->Webhook->エンドポイントを追加->URL打ち込む
SIGNING_SECRETを.envに追記
const stripe = require("stripe")(process.env.STRIPE_SECRET_KEY); const signature = req.headers["stripe-signature"]; const signingSecret = process.env.STRIPE_SIGNING_SECRET; const reqBuffer = await buffer(req); let event; event = stripe.webhooks.constructEvent(reqBuffer, signature, signingSecret);
基本的にリンクの手順通りで良かったです
.github/workflows/playwright-onDemand.yml .github/workflows/playwright-scheduled.yml
がこけてたので消して動かしました。
チュートリ
チュートリアル:静的にレンダリングされた Next.js の Web サイトを Azure Static Web Apps にデプロイする | Microsoft Docs
公式でフォークを推奨されてるレポ(CIが動いたり動かなかったりしてる)
GitHub - staticwebdev/nextjs-starter: A Next.js starter application for deploying to Azure Static Web Apps
公式が動かないのは久々にマイクロソフトらしさを感じてよかったです。
最近TypeScriptやVSCodeやGitHubで徳を積みすぎてるので、ちゃんと動かないチュートリアルやトラブルを一生シュートしてくれないトラブルシューティングガイドとか出してバランスをとって欲しいですね。
結論
import { useAuth0 } from "@auth0/auth0-react"; const { user } = useAuth0(); console.log("user id:", user.sub);
このユーザーIDはテナントユニークです
試しにGoogleAuthとメアド認証で共通のメアドを持つ二人を生成したところ、別のIDでした(それはそう)