Firebase의 최신 데이터베이스.
1. 생성된 프로젝트를 들어간다.
2. Cloud Firestore추가한다
3. 데이터 베이스 만들기를 선택한다.
4. 저는 테스트모드에서 시작하였습니다.
5. Cloud Firestore위치를 asia-east2로 설정한다.
yarn add firebase
npm을 통한 설치
npm install firebase
npm install -g firebase-tools
firebase login
firebase init
8.1 Are you ready to proceed? -> Y
8.2 Which Firebase features do you want to set up for this directory? Press Space to select features, then Enter to confirm your choices.
-> hosting, storage, firsebase를 선택함
8.3 Please select an option -> Use an existing project
8.4 Select a default Firebase project for this directory -> 만든 프로젝트 선택
--- FireStore Setup
8.5 What file should be used for Firestore Rules? -> firestore.rules
8.6 What file should be used for Firestore indexes? -> firestore.indexes.json
--- Hosting Setup
8.7 What do you want to use as your public directory? public
8.8 Configure as a single-page app (rewrite all urls to /index.html)? -> y
8.9 Set up automatic builds and deploys with GitHub? -> y
8.10 File public/index.html already exists. Overwrite? -> N
8.11 For which GitHub repository would you like to set up a GitHub workflow? -> {내 github id}/{프로젝트 ID}
8.12 Set up the workflow to run a build script before every deploy? -> y
8.13 What script should be run before every deploy? -> npm ci && npm run build
8.14 Set up automatic deployment to your site's live channel when a PR is merged? -> y
8.15 What is the name of the GitHub branch associated with your site's live channel? (main) -> main
yarn build
yarn add serve
serve -s build
https://firebase.google.com/docs/web/setup?hl=ko
app.tsx로 돌아가지 않고 아래같이 나오는 경우가 있다.
이럴 경우,public/index.html을 보면 바뀌어있는 것을 볼 수 있다.이건 내가 8.5에서 public/index.html을 overwrite한다고 해둬서 그런거였다(지금은 수정했습니다.) 그래서 다른 프로젝트에서 사용하는 index.html 을 사용했습니다.