Nuxt v2 & Firebase(Hosting/ Functions SSR), RTDB, Google Auth SNS Example.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 8be583e Nov 7, 2018

README.md

Nuxt & Firebase(Hosting and Functions SSR), RTDB, Google Auth SNS Example

Image from Gyazo

Requirements

Need the following environment variables.

Image

export APIKEY=
export AUTHDOMAIN=
export DATABASEURL=
export PROJECTID=
export STORAGEBUCKET=
export MESSAGINGSENDERID=

recommendation: direnv/direnv

Build Setup

# install dependencies
$ yarn

# serve with hot reload at localhost:3000
$ yarn dev

# build for production and launch server
$ yarn build
$ yarn start

Deploy to Firebase

This application can also be launched with the normal Node.js application. However, by using Firebase Hosting and Firebase Functions, it can be used efficiently in a serverless environment.

setup project

$ yarn firebase init

setup env

firebase functions:config:set environment.apikey=""
firebase functions:config:set environment.authdomain=""
firebase functions:config:set environment.databaseurl=""
firebase functions:config:set environment.projectid=""
firebase functions:config:set environment.storagebucket=""
firebase functions:config:set environment.messagingsenderid=""

deploy

$ yarn deploy