How to upload cloud function

After downloading the Glover file with the cloud function folder, you need to extract the cloud function folder to a seperate folder on your computer.

  1. From the terminal nagivate to the folder you extraced the cloud function to. How to open folder in terminal Macos: https://www.maketecheasier.com/launch-terminal-current-folder-mac/ How to open folder in terminal Windows: https://www.wikihow.com/Open-a-Folder-in-Cmd

  2. In the terminal you will need to install firebase package if its not already installed in your computer. Run the following commands to install the needed packages: npm install cd functions npm install cd ..

  3. After the commands above, you need to run firebase login to login to the firebase account where you have the firebase project on. Follow the link that shows in the terminal after running the command to login.

  4. After you add a project with firebase use --add <projektName> you need to select it with firebase use <projectName>. Then you can deploy to the selected project with firebase deploy or firebase deploy --only functions.

  5. After login completed, you need to run the command the deploy the function to your firebase server. Run this command to deploy to firebase: firebase deploy

Last updated