Skip to content

Nuxt.js + Firebase Database/Auth simple quiz project

Notifications You must be signed in to change notification settings

Fifciu/firebase-nuxt-quiz

Repository files navigation

Firebase Nuxt Quiz

Nuxt.js + Firebase Database/Auth simple quiz project Created in order to learn something about Firebase

Live version: https://fifciu.github.io/firebase-nuxt-quiz/

How to install

Clone this repo

git clone https://github.com/FilipJedrasik/firebase-nuxt-quiz.git

Create project on https://firebase.google.com/

Go to "Database" Tab and import fir-nuxt-quiz-export.json It is good to disable restrinctions in rules subtab when you are testing App.

{
  "rules": {
    ".read": true,
    ".write": true
  }
}

Go to "Authentication" Tab and enable login by Email/password. Then get api keys and put them in firebase.js file in main directory (same as package.json, nuxt.config.js...). It should look like that:

module.exports = {
  apiKey: "my-super-key",
  authDomain: "my-super-domain",
  databaseURL: "my-super-database",
  projectId: "fir-nuxt-quiz",
  storageBucket: "my-super-appspot",
  messagingSenderId: "xxxxxxxxxx"
}

Run npm install

Okay, now you can use npm run dev to locally test the App. If you want to deploy - read below.

How to deploy

Open nuxt.config.js In line 58. you have

base: process.env.DEPLOY_ENV === 'GH_PAGES' ? '/firebase-nuxt-quiz/' : '/'

Where /firebase-nuxt-quiz/ is your basic path to app while using npm run build/npm run generate. I chose that one for my Github Pages. At the end you have to run npm run generate and upload /dist folder to your server. If you want to push it to gh-pages - use npm run deploy

About

Nuxt.js + Firebase Database/Auth simple quiz project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published