Setting up an HTTPS function is easy: you run firebase init in a directory, choose ‘functions’ when asked what to initialize, and and the CLI will generate The necessary files for your project. In your index. js file, you write the node. js code for your function, and then run firebase deploy from that same directory.