adding latest

This commit is contained in:
2020-03-15 02:12:16 +00:00
parent d5777fd167
commit 0f33f70ee4
18 changed files with 4495 additions and 217 deletions

30
tutorial.md Normal file
View File

@@ -0,0 +1,30 @@
Install amplify globally
`yarn global add @aws-amplify/cli`
Create new amplify app in project
`amplify init`
Amplify commands after init
`amplify status` - will show you what you've added already and if it's locally configured or deployed
`amplify add <category>` - will allow you to add features like user login or a backend API
`amplify push` - will build all your local backend resources and provision it in the cloud
`amplify console` - to open the Amplify Console and view your project status
`amplify publish` - will build all your local backend and frontend resources (if you have hosting category added) and provision it in the cloud
`amplify add api` - to create a backend API and then
`amplify publish` - to deploy everything
Install aws amplify dependencies into project
`yarn add aws-amplify aws-amplify-vue`
Add the Amplify instance to Vue instance in `main.js`
Create a new js file in `./src/utils/auth.js` - write the aws amplify code in here.
You need to write a function for each auth flow. Signup, GetUser etc.
Remember to use
`export {getUser, signUp, confirmSignUp, resendSignUp, signIn, signOut}`
at the end so it can be imported later.