uutaein / vf

vue & firebase lecture

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vf

Vue & Firebase lecture default source

Setup guide

Download

Download the source to your desired location

$ git clone https://github.com/fkkmemi/vf test
$ cd test

Dependecies install

Dependencies installation

$ yarn # front-end install
$ cd functions && yarn # back-end install
$ cd ..

Web customize

Change to whatever name you like

public/index.html

<title>This is my web</title>

package.json

{
  "name": "my-web",
  "description": "my web"
}

Firebase console setting

site connect

https://console.firebase.google.com

project add

alt new project

alt anal

alt prog

alt fin

Authentication

Activation of authentication

email enable
alt email

google enable
alt google

Database

Activation of database

firestore
alt firestore

alt firestore

Storage

Activation of storage

alt storage

Project settings

alt setting 1

alt setting 2

copy firebaseConfig

alt setting 2

firebaseConfig file make

./firebaseConfig.js

export default {
  apiKey: 'AIzaSyBLUOZIpmKBO9ImYk_FrFa1IHr6u_VygOM',
  authDomain: 'new-project-f36b8.firebaseapp.com',
  databaseURL: 'https://new-project-f36b8.firebaseio.com',
  projectId: 'new-project-f36b8',
  storageBucket: 'new-project-f36b8.appspot.com',
  messagingSenderId: '556943987787',
  appId: '1:556943987787:web:76773c1159b3cac930a9ce'
}

make key

alt key

copy key.json

new-project-f36b8-e568f7f61e3c.json -> /functions/key.json

Firebase upgrade

Spark plan is too restrictive and is hard to use

spark -> blaze

alt up

alt up

firebase use

$ sudo npm i firebase-tools -g # If you don't have firebase-tools
$ firebase login # If you are not logged in
$ firebase use --add
? Which project do you want to add? 
❯ new-project-f36b8 
? What alias do you want to use for this project? (e.g. staging) default

Created alias default for new-project-f36b8.
Now using alias default (new-project-f36b8)

Firebase functions setting

admin setting

Admin Email Settings

$ cd functions
$ firebase functions:config:set admin.email=abcd@xxx.com

runtimeconfig.json

Runtime file generation

$ cd functions
$ firebase functions:config:get>.runtimeconfig.json

git

create

site connect

https://github.com

alt git make

remove .git

.git file remove

$ rm -rf .git # mac or linux

git push

push your repository

$ git init
$ git commit -m "first commit"
$ git add .
$ git remote add origin https://github.com/user/xxx.git
$ git push -u origin master

local test

functions

$ yarn serve:be

web

$ yarn serve

deploy

full

$ yarn deploy

functions

$ yarn deploy:be

web

$ yarn deploy:fe

view

sign

alt sign

main

alt main

About

vue & firebase lecture


Languages

Language:Vue 70.2%Language:JavaScript 28.1%Language:HTML 1.7%