Trying out the Firebase firestore with a simple chat app.
Branch: master
Clone or download
Latest commit e8aea74 Mar 12, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README Update readme Mar 9, 2018
src Update readme Oct 8, 2017
.babelrc First commit Oct 7, 2017
.gitignore First commit Oct 7, 2017
BLOGPOST.md Improve blogpost Oct 9, 2017
BLOG_ARTICLE-OLD.md Improve blogpost Oct 9, 2017
BLOG_ARTICLE.md Improve blogpost Oct 9, 2017
README.md Update readme Mar 9, 2018
index.html First commit Oct 7, 2017
package-lock.json
package.json Update readme Oct 8, 2017
webpack.config.js

README.md

Firechat

A sample app with Vue.js, Vuex and Google Firestore.

Install

Install NPM :

npm i -D

Create an account Google Firestore.
And obtain code (click “Add Firebase to your web app”) : example

You obtain that

// Initialize Firebase
  var config = {
    apiKey: "...",
    authDomain: "PROJECT.firebaseapp.com",
    databaseURL: "https://PROJECT.firebaseio.com",
    projectId: "PROJECT",
    storageBucket: "",
    messagingSenderId: "..."
  };
  firebase.initializeApp(config);

Create config.js in ./src/config.js and format same as :

const config = {
    apiKey: "...",
    authDomain: "PROJECT.firebaseapp.com",
    databaseURL: "https://PROJECT.firebaseio.com",
    projectId: "PROJECT",
    storageBucket: "",
    messagingSenderId: "..."
};
export default config

Retur on Firestore and go to Left Menu->DEVELOP->Database.
Click “Cloud Firestore”, then select “test mode” (it means your database will be public, so don’t share the link on the internet anywhere). example

Launch server

npm run dev

Doc