title: Is there a way to call a Firebase server "function" from within a client app, say with Angular 2?
body: <p>So Firebase offers something called "functions", which is essentially a nodejs server that has all of the Firebase stuff preconfigured and has all the scaling automatically handled. I'm wondering, is there a way to call a function inside of the "functions" index.js file from an angular 2 app?</p>
  
  <p>I need to utilize the firebase-admin npm module to check if a user's email exists and then grab the uid for that user, if it does.</p>
  
  <p>According to this <a href="https://javebratt.com/firebase-cloud-functions/" rel="noreferrer">link</a>, I can setup my index.js file such as:</p>
  
  <pre><code>const functions = require('firebase-functions');
  const admin = require('firebase-admin');
  admin.initializeApp(functions.config().firebase);
  
  // I'm actually not sure if this is how you do this part:
  exports.getUserByEmail = (email) =&gt; {
    return admin.auth().getUserByEmail(email);
  }
  </code></pre>
  
  <p>Is there a way I can call <code>getUserByEmail()</code> inside of a component in my Angular 2 app?</p>
  
  <p>Thanks in advance!</p>