nuxt-firebase-pwa
nuxt-firebase-pwa copied to clipboard
Run the Nuxt.js application (SPA * SSR * PWA) on Firebase.
nuxt-firebase-pwa
👻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!!!