title: Read data from cloud firestore with firebase cloud function?
body: <p>I'm an Android developer and recently I've started working on a project based on firebase cloud functions and firestore database. I'm writing an HTTP trigger function that will take two parameters and compare that parameter value with the firestore data value and if the value matches then return a response of true or else false.</p>
  
  <p><strong>Duplicate Question:</strong></p>
  
  <p>Yes, there are some question already asked related to mine but they are not similar:</p>
  
  <ol>
  <li><p><a href="https://stackoverflow.com/questions/47522205/firestore-cloud-functions-how-to-read-from-another-document">Firestore + cloud functions: How to read from another document</a></p></li>
  <li><p><a href="https://stackoverflow.com/questions/43913139/firebase-http-cloud-functions-read-database-once">Firebase HTTP Cloud Functions - Read database once</a></p></li>
  </ol>
  
  <p><strong>Firebase Docs says</strong>: </p>
  
  <blockquote>
    <p>Cloud Firestore supports create, update, delete, and write events</p>
  </blockquote>
  
  <p>I want to read firestore value from HTTP trigger.</p>
  
  <p><strong>What I have tried:</strong></p>
  
  <pre><code>exports.userData = functions.https.onRequest((req, res) =&gt; {
  
   const user = req.query.user;
   const pass = req.query.pass;
  });
  </code></pre>
  
  <p>I'm pretty much stuck at this part. Any help will be greatly appreciated. Thanks</p>
  
  <p>P.S. I have very limited knowledge related to JS/TypeScript/NodeJS</p>