You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update firebase and firebase-admin SDK. Since there are some changes in the import method, we man need more time to update the package.
If it is possible, change the import method from CommonJS to ESM module.
Update apollo-server from 2 to 3. But it seems that v3 doesn't support subscription natively. So we may need some time to investigate how to make subscription function normally.
Installation
First you need to install all the necessary packages. Run the following command in the directory functions:
npm install
Running, locally
在run之前,要先下載專案的 service accounts file,並設定環境變數GOOGLE_APPLICATION_CREDENTIALS。參考這裡
Prequiste: You need to have docker + docker-compose to be installed.
In the directory, run the following command:
docker compose up
We don't push the image to Dockerhub, so the image would be built locally.
The firestore emulator data would be store in the directory ./emulator-data when you exit. And it would be import to the firestore emulator when you start the container next time. If you want to empty the firestore emulator, just delete the content in the directory.
You must have ./emulator-data directory before set up container, or the container would crash.
If you want to test the auth functionality, you can see here. The port(9099) already be exposed. Make sure you connect to the auth service using 0.0.0.0:9099 rather than localhost:9099
Connect to the service by 0.0.0.0:<port> rather than localhost:<port>(It depends on Windows or Mac)
Deployment
在最一開始想先安裝firebase-tools和initialize,參考get started step 2 and 3