LoginSignup
3
4

More than 5 years have passed since last update.

AmplifyとReactを使用して爆速でWEBアプリを作成する

Posted at

Amplify Command Line Interface (CLI)のインストール

初めてAmplifyを使う場合には以下のコマンドを実行する。

npm install -g @aws-amplify/cli
amplify configure

Enterを押していくと、IAM Management Consoleが開くので、
ブラウザ上でIAMロールを作成して、accessKeyIdとsecretAccessKeyを取得する。

create-react-appでアプリケーション作成

npm install -g create-react-app
create-react-app myapp && cd myapp
npm start

Amplifyのインストール

npm install --save aws-amplify
npm install --save aws-amplify-react

Amplifyの設定

amplify init

以下のような感じ(?)
? Choose your default editor: Emacs (via Terminal, Mac OS only)
? Choose the type of app that you're building javascript
Please tell us about your project
? What javascript framework are you using react
? Source Directory Path: src
? Distribution Directory Path: build
? Build Command: npm run-script build
? Start Command: npm run-script start

公開

amplify add hosting
amplify publish
3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4