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
Authentication
Activation of authentication
Database
Activation of database
Storage
Activation of storage
Project settings
copy firebaseConfig
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
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
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
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