Git Product home page Git Product logo

0421-firebase-deploy's Introduction

0421-firebase-deploy

How to deploy a Vue Project with using Firebase?

  1. Make sure already install Node.js and firebase in global
$ npm install -g firebase-tools
#or
$ yarn add -g firebase-tools
  1. Connect to your firebase account
$ firebase login
  1. Login and initialize firebase in your project
$ firebase init
  1. Ready to proceed and switch to the Hosting section

image-20230424222001782

image-20230424222103188

#or 

$ firebase init hosting

image-20230424223403674

  1. Create a new firebase project for your project or you can choose the current existing project.

image-20230424223059906

image-20230424223548835

  1. You will be asked which one to use as the startup directory, so instead of the default public, write dist Since npm run build/ yarn build, the dist directory is created when you build your project (Vue/React). If you have already created a dist directory, the files will still be placed in this directory after packaging.
  2. Choose rewrite index.html with input y, even exist or not, also choose y

image-20230424223731080

  1. Choose a GitHub repository for this project and setup the CI/CD settings

image-20230424224220072

  1. Until here the firebase initialize was done, now run the npm run build or yarn build in terminal to build the project.

image-20230424224619045

  1. Run firebase deploy in the terminal to start the hosting
$ firebase deploy

image-20230424224923195

  1. Follow the Hosting URL given here to visit your project!

image-20230424225110935

  1. You may also visit the firebase console to view your project information.

0421-firebase-deploy's People

Contributors

kaikiat1126 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.