Vue + Nuxt + Firebase에서 SPA (그 1)

3415 단어 SPAVue.jsnuxt.js

환경 구축


  • 1 firebase에서 프로젝트 추가
  • 2 vue+nuxt 설정

  • htps : // 푹 빠져라. 오, ぇ. 이 m부터 시작합니다.
    오른쪽 상단의 Go to console을 클릭합니다.
  • 새 프로젝트 만들기
  • 프로젝트 및 국가 이름 입력

  • 프로젝트를 로컬로 시작


    npm install -g firebase-tools
    
    firebase login
    

    login 후 project 만들기



    htps : // 이런. 푹 빠져라. 오, ぇ. 코m/ 에서 새 프로젝트 만들기를 클릭하여 프로젝트 만들기



    firebase init


    
    $ firebase init
    
         ######## #### ########  ######## ########     ###     ######  ########
         ##        ##  ##     ## ##       ##     ##  ##   ##  ##       ##
         ######    ##  ########  ######   ########  #########  ######  ######
         ##        ##  ##    ##  ##       ##     ## ##     ##       ## ##
         ##       #### ##     ## ######## ########  ##     ##  ######  ########
    
    
    
    You're about to initialize a Firebase project in this directory:
    
    Before we get started, keep in mind:
    
      * You are initializing in an existing Firebase project directory
    
    ? Which Firebase CLI features do you want to setup for this folder? Press Space to select features, then Enter to confirm your choices. Hosting: Configure and deploy Firebase Hosting
    sites
    
    === Project Setup
    
    First, let's associate this project directory with a Firebase project.
    You can create multiple project aliases by running firebase use --add,
    but for now we'll just set up a default project.
    
    i  .firebaserc already has a default project, skipping
    
    === Hosting Setup
    
    Your public directory is the folder (relative to your project directory) that
    will contain Hosting assets to be uploaded with firebase deploy. If you
    have a build process for your assets, use your build's output directory.
    
    ? What do you want to use as your public directory? public
    ? Configure as a single-page app (rewrite all urls to /index.html)? Yes
    ? File public/index.html already exists. Overwrite? Yes
    ✔  Wrote public/index.html
    
    i  Writing configuration info to firebase.json...
    i  Writing project information to .firebaserc...
    
    ✔  Firebase initialization complete!
    

    firebase serve



    http://localhost:5000/ 방문하면 다음 웹 페이지가 열려 있어야합니다.

    firebase 코드 붙여넣기



    public/index.html 사이에 붙여 넣자.

    firebase deploy


    $ firebase deploy
    
    === Deploying to 'storyproject-4e200'...
    
    i  deploying hosting
    i  hosting[storyproject-4e200]: beginning deploy...
    i  hosting[storyproject-4e200]: found 10 files in public
    ✔  hosting[storyproject-4e200]: file upload complete
    i  hosting[storyproject-4e200]: finalizing version...
    ✔  hosting[storyproject-4e200]: version finalized
    i  hosting[storyproject-4e200]: releasing new version...
    ✔  hosting[storyproject-4e200]: release complete
    
    ✔  Deploy complete!
    
    Hosting URL: https://storyproject-4e200.firebaseapp.com
    

    화면에 deploy했습니다. 가 표시됩니다.

    계속은 또 기재하겠습니다.

    좋은 웹페이지 즐겨찾기