Firebase Edge Functions
Firebase Setup
Setup your firebase app using this guide.
Edge Functions
- Create a service account in the Firebase console.
- Add the service account key file to the
backend/firebase/functions
directory. - Don’t rename the file.
If you want to use firebase for edge functions, you can use the local instance of firebase-functions in the firebase/functions
directory.
Run the following command to start the firebase functions server:
cd firebase/functionsnpm installnpm run serve# It will give you the URL to access the firebase functions server,# You can use it as an API endpoint in your application.
If you want to also watch the firebase functions code and automatically restart the server on changes, you can run the following command:
# Run this in a new terminalnpm run build:watch