Skip to content
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.

kamatte-me/nuxt-firebase-pwa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nuxt-firebase-pwa

Nuxt.js * Firebase = SPA * SSR * PWA * Serverless

DEMO

👻Description

Run the Nuxt.js application on Firebase.

Features

  • SPA (Single Page Application)
  • SSR (Sever Side Rendering)
  • PWA (Progressive Web Apps)
  • Serverless (Cloud Functions for Firebase + Firebase Hosting)

Libraries

👶Start

Install dependencies

$ npm install # Or yarn install
$ cd /path/to/nuxt-firebase-pwa/src && npm install
$ cd /path/to/nuxt-firebase-pwa/functions && npm install

Launch development server

$ cd /path/to/nuxt-firebase-pwa/src
$ npm run dev

Open http://localhost:3000

🚀Build and Deploy to Firebase

Build

Build Nuxt.js app.

$ cd /path/to/nuxt-firebase-pwa/src
$ npm run build

Copy assets and static files.

$ cd /path/to/nuxt-firebase-pwa
$ npm run setup

Firebase Project Setup

Create a Firebase Project using the Firebase Console.

Install Firebase CLI.

$ npm install -g firebase-tools
$ exec $SHELL -l

Login to Firebase.

$ firebase login

Edit .firebaserc

{
  "projects": {
    "default": "<your-firebase-project-id>"
  }
}

Emulate Firebase on local

$ npm run serve

Open http://localhost:5000

Deploy🎉

$ npm run deploy

Let's enjoy!!!