Vue Mastery

The ultimate learning resource for Vue developers.


# serve with hot reloading at localhost:3000
$ npm run dev

Go to http://localhost:3000


This is just in case we want to deploy on differrent server then firebase hosting

# build for production and launch the server
$ npm run build
$ npm start


# generate a static project
$ npm run generate


You should probably generate the static porject before you deploy as the deployment take every static output from nuxt to the dist folder, which is then copy over to firebase host folder.
The functions folder is also copy over and help us to repsond to specific backend tasks.

# deploy the complete solution:
$ firebase deploy
# deploy only the functions:
$ firebase deploy --only functions
# deploy only the generated static pages:
$ firebase deploy --only hosting
# Shortcut that you should probably use all the time for deployment:
$ npm run generate; firebase deploy

Staging vs production

You can deploy on staging or in production with this command:

# deploy solution in production
$ firebase use default
# deploy solution on staging
$ firebase use staging