title: Firebase and backend logic
body: <p>I am parse.com  user, and now I look for another service. 
  How can I write back end logic to firebase?</p>
  
  <p>let say I want to validate all the values on server side, or trigger things. I thought about one solution, but I want to know the recommended way.</p>
  
  <p>I think to</p>
  
  <ol>
  <li>create nodejs server, that uses express.</li>
  <li>create middlewares to handle the logic.</li>
  <li>send rest request from the app, that triggers the middlewares</li>
  <li>use the nodejs sdk of firebase to update the values according to the params of the http request.</li>
  <li>And implement on the app firebase handler that listen to changes</li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/0prtI.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/0prtI.jpg" alt="enter image description here"></a></p>
  
  <p>their something simpler? In parse I used cloud code, I want that the logic will not be on the client side but on a server side.</p>