Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
firebase is working
- Loading branch information
Showing
7 changed files
with
1,393 additions
and
582 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
VUE_APP_API_KEY="AIzaSyBi03NBONZ2ncp4PSvjbAplWm6pC5XnjTw" | ||
VUE_APP_AUTH_DOMAIN="dmd-4470.firebaseapp.com" | ||
VUE_APP_DATABASE_URL="https://dmd-4470.firebaseio.com" | ||
VUE_APP_PROJECT_ID="dmd-4470" | ||
VUE_APP_STORAGE_BUCKET="dmd-4470.appspot.com" | ||
VUE_APP_MESSAGE_SENDER_ID="159373794744" | ||
VUE_APP_APP_ID="1:159373794744:web:ca93db7d63c296b472834d" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import * as firebase from "firebase/app"; | ||
|
||
import "firebase/auth"; | ||
import "firebase/firestore"; | ||
|
||
firebase.initializeApp({ | ||
apiKey: process.env.VUE_APP_API_KEY, | ||
authDomain: process.env.VUE_APP_AUTH_DOMAIN, | ||
databaseURL: process.env.VUE_APP_DATABASE_URL, | ||
projectId: process.env.VUE_APP_PROJECT_ID, | ||
storageBucket: process.env.VUE_APP_STORAGE_BUCKET, | ||
messagingSenderId: process.env.VUE_APP_MESSAGING_SENDER_ID, | ||
appId: process.env.VUE_APP_APP_ID, | ||
measurementId: process.env.VUE_APP_MEASUREMENT_ID, | ||
}); | ||
|
||
export default { | ||
install(vue, opts){ | ||
// Attach necessary Firebase APIs here | ||
// @url https://firebase.google.com/docs/web/setup | ||
window.db = firebase.firestore(); | ||
window.firebase = firebase; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
let firebaseui = {}; | ||
firebaseui.install = function (Vue, options) { | ||
|
||
|
||
// 1. add global method or property | ||
// Vue.myGlobalMethod = function () { | ||
// // some logic ... | ||
// } | ||
|
||
// 2. add a global asset | ||
// Vue.directive('my-directive', { | ||
// bind (el, binding, vnode, oldVnode) { | ||
// // some logic ... | ||
// } | ||
// ... | ||
// }) | ||
|
||
// 3. inject some component options | ||
// Vue.mixin({ | ||
// created: function () { | ||
// // some logic ... | ||
// } | ||
// ... | ||
// }) | ||
|
||
// 4. add an instance method | ||
Vue.prototype.$myMethod = function (methodOptions) { | ||
// some logic ... | ||
} | ||
} | ||
|
||
export default firebaseui |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,9 @@ export default { | |
name: 'home', | ||
components: { | ||
HelloWorld | ||
}, | ||
mounted() { | ||
// console.log(db); | ||
} | ||
} | ||
</script> |
Oops, something went wrong.