hirokazukano / learnjs

Prepared Workspace for "Serverless Single Page Apps" @ Pragprog

Home Page:https://pragprog.com/book/brapps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Study Serverless Single Page Apps

deploy url: http://learnjs.study.jp.s3-website-ap-northeast-1.amazonaws.com/

AWS CLI setup for mac

  1. sudo easy_install pip
  2. sudo -H pip install awscli --upgrade --ignore-installed six
  3. aws --version
  4. aws configure --profile adminで~/.aws/credentialsに設定が書き出される

S3 bucket create and deploy

  • create $ ./sspa create_bucket learnjs.study.jp
  • deploy $ ./sspa deploy_bucket learnjs.study.jp

Amazon Cognito設定

Google認証設定

Integrating Google Sign-In into your web app

  1. Google Developers Consoleにログイン
  2. プロジェクトを作成
  3. 「APIを有効にする」を選択
  4. 「認証情報」を選択
  5. OAuth同意画面を入力
  6. 認証情報作成をクリックして「OAuthクライアントID」を選択
  7. 種類を「ウェブアプリケーション」を選択して作成
  8. クライアントIDをconf/cognito/identity_pools/learnjs/config.jsonに追記

アイデンティティプールの作成

./sspa create_pool conf/cognito/identity_pools/learnjsを実行

  • assume_role_policy.json,pool_info.json,role_info.jsonが作成される
  • awsに新しいroleとGognitoにFederate Identitiesが作成される

About

Prepared Workspace for "Serverless Single Page Apps" @ Pragprog

https://pragprog.com/book/brapps


Languages

Language:JavaScript 88.6%Language:Shell 7.4%Language:HTML 3.4%Language:Makefile 0.4%Language:Python 0.2%