Reputation: 374
I am building a web-app that will allow users to create their own domain and/or sub-domain to host their own templated website. I can't find any reference for interacting with cloud hosting through the admin sdk or cloud functions.
Aside from using the firebase dashboard, how can we programmatically create and manage domains and hosting in Firebase?
Thank you!
-Tim
Upvotes: 1
Views: 520
Reputation: 598775
There is a REST API for interacting with Firebase Hosting, but it is not wrapped in any of the Admin SDKs as far as I know. It is a valid feature request, so I recommend posting it on the Github repo of the Admin SDK you're using.
The best I've found is to look at how the Firebase CLI accesses the REST API, and replicate that in my own project. That's for example, how I created this code to update a single file in an existing site.
Upvotes: 2