v-kansai Vue.js/Nuxt.js meetup #6
chan_kakuz
フリュー株式会社
サーバサイドエンジニア
Master Commit
Test&Build
& Deploy
Deploy
Cache Kill
Master Commit
Test&Build
& Deploy
Deploy
Cache Kill
この部分を置き換えることができる
Auth
Analytics
API
Storage
Cache
Logger
etc....
//vue-cli
$ vue create sample-app
$ cd sample-app
$ npm i -D aws-amplify aws-amplify-vue
// amplify-cli
$ amplify add auth
$ amplify push
下準備
import Vue from 'vue'
import App from 'App.vue'
import Amplify, * as AmplifyModules from 'aws-amplify'
import { AmplifyPlugin } from 'aws-amplify-vue'
import aws_exports from './aws-exports'
Amplify.configure(aws_exports)
Vue.use(AmplifyPlugin, AmplifyModules)
new Vue({
render: h => h(App)
}).$mount('#app')
main.js変更
<template>
<div id="app">
<amplify-authenticator></amplify-authenticator>
</div>
</template>
<script>
import { Auth } from 'aws-amplify'
export default {
name: 'app',
components: {}
}
</script>
App.vue変更