Ask Your Question
1

How does Firebase differentiate whether it is deploying to hosting or cloud functions when using "firebase deploy"?

asked 2021-08-27 11:00:00 +0000

bukephalos gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-10-31 22:00:00 +0000

nofretete gravatar image

Firebase differentiates between deploying to hosting or cloud functions by looking at the contents of the project's firebase.json file.

If the firebase.json file has a "hosting" property defined, then running the command firebase deploy will deploy the project to Firebase Hosting.

If the firebase.json file has a "functions" property defined, then running the command firebase deploy will deploy the project's Cloud Functions.

If the firebase.json file has both a "hosting" and "functions" property defined, then running the command firebase deploy without any additional parameters will deploy both Firebase Hosting and Cloud Functions.

However, if the firebase.json file only has a "database" property defined, running the command firebase deploy will not do anything as it does not have anything to deploy.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-08-27 11:00:00 +0000

Seen: 9 times

Last updated: Oct 31 '22