Skip to content

Commit 29814f4

Browse files
authored
Update README.md
1 parent a6ef453 commit 29814f4

File tree

1 file changed

+19
-53
lines changed

1 file changed

+19
-53
lines changed

README.md

Lines changed: 19 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -6,83 +6,49 @@ This auth starter implements withAuthenticator HOC to provide a basic authentica
66

77
![Amplify Auth](src/images/auth.gif)
88

9-
## Getting started
9+
## Deploy with the AWS Amplify Console
1010

11-
1. <a class="github-button" href="https://github.com/aws-samples/create-react-app-auth-amplify/fork" data-icon="octicon-repo-forked" aria-label="Fork repo">Fork repo</a>
11+
The AWS Amplify Console provides hosting for fullstack serverless web apps. [Learn more](https://console.amplify.aws). Deploy this to your AWS account with a single click:
1212

13+
[![amplifybutton](https://oneclick.amplifyapp.com/button.svg)](https://console.aws.amazon.com/amplify/home#/deploy?repo=https://github.com/aws-samples/create-react-app-auth-amplify)
1314

14-
2. Clone locally
15-
```
16-
git clone git@github.com:<your-username>/create-react-app-auth-amplify.git
17-
```
15+
The Amplify Console will first deploy a backend, and then build and deploy your frontend available at `https://master.appid.amplifyapp.com`.
1816

19-
2. Change into the new directory
17+
## Run locally with the Amplify CLI
2018

21-
```sh
19+
1. Clone the repo that was just forked in your account
20+
21+
```
22+
git clone git@github.com:<username>/create-react-app-auth-amplify.git
2223
cd create-react-app-auth-amplify
2324
```
2425

25-
3. Install dependencies
26+
2. Import the backend environemtn deployed by the Amplify Console to your repo (the `amplify/team-provider.json` file contains information on all your backend environments). After running this command your `amplify/team-provider.json` should have a backend named `amplify`.
2627

27-
```sh
28-
yarn
29-
# or
30-
npm install
3128
```
29+
amplify env import --name amplify --config "{<stack-info>}" --awsInfo "{\"configLevel\":\"project\",\"useProfile\":true,\"profileName\":\"default\"}" --yes
3230
33-
4. Install & configure the AWS Amplify CLI.
34-
35-
```sh
36-
npm install -g @aws-amplify/cli
37-
38-
amplify configure
31+
Successfully added environment from your project
3932
```
4033

41-
> To see a video of how to configure the CLI, click [here](https://www.youtube.com/watch?v=fWbM5DLh25U)
42-
43-
5. Create a new AWS Amplify Project
34+
3. Initialize the Amplify CLI with the `amplify` environment.
4435

4536
```
4637
amplify init
47-
```
38+
? Do you want to use an existing environment? Yes
39+
? Choose the environment you would like to use: (Use arrow keys)
40+
> amplify
4841
49-
> Here, walk through the following steps. At the end of the `init` command a project will be initialized in the cloud for you.
50-
51-
- Enter a name for the environment __master__
52-
- Choose your default editor: __Sublime Text__ (or your editor of choice)
53-
- Do you want to use an AWS profile? __y__ (choose default)
54-
55-
6. Run `amplify status`. The status should reflect as below. This indicates that an `Auth` resource is configured and ready to be created.
56-
57-
```
58-
| Category | Resource name | Operation | Provider plugin |
59-
| -------- | --------------- | --------- | ----------------- |
60-
| Auth | cognito2140b2f3 | Create | awscloudformation |
6142
```
6243

63-
6. Push the updated project configuration to AWS. It will deploy a CloudFormation template that has an Amazon Cognito resource that enables user authentication.
44+
4. Run locally
6445

65-
```sh
66-
amplify push
6746
```
68-
69-
7. Then you can run it by:
70-
```sh
7147
npm start
72-
```
73-
74-
## Hosting with the AWS Amplify Console
75-
76-
The AWS Amplify Console provides continuous deployment and hosting for modern web apps (single page apps and static site generators). Continuous deployment allows developers to deploy updates to their frontend and backend on every code commit to their Git repository. If the build succeeds, the app is deployed and hosted on a global CDN with an *amplifyapp.com* domain. The Amplify Console offers globally available CDNs, easy custom domain setup, feature branch deployments, and password protection.
7748
78-
1. Push your code to Git.
79-
1. Login to the [AWS Amplify Console](https://console.aws.amazon.com/amplify/home) and choose **Connect app**
80-
1. Connect repository and select `master` branch.
81-
1. Accept the default build settings.
82-
1. Give the Amplify Console permission to deploy backend resources with your frontend. This will allow the Console to detect changes to your backend on every code commit. If you do not have a service role, follow the prompts to create one.
83-
1. Review your changes and then choose **Save and deploy**. You app will now be available in a few minutes at `https://master.unique-id.amplifyapp.com`.
49+
``
8450
85-
The Amplify Console will first check for changes to your backend, and then build and deploy your frontend to a managed hosting environment. You can now continuously deploy changes to your frontend or backend and Amplify will automatically deploy those changes. Learn how to customize the sign-in UI [here](https://aws-amplify.github.io/docs/js/authentication#customize-ui).
51+
Learn how to customize the sign-in UI [here](https://aws-amplify.github.io/docs/js/authentication#customize-ui).
8652
8753
<!-- <img src="https://github.com/swaminator/gatsby-auth-starter-aws-amplify/blob/master/src/images/amplify-console.gif" width="800"/> -->
8854
![Amplify Console](src/images/amplifyconsole-cra.gif)

0 commit comments

Comments
 (0)