{"componentChunkName":"component---src-templates-post-template-js","path":"/posts/note-to-myself-when-deploying-to-firebase","result":{"data":{"markdownRemark":{"id":"615bf1fb-11fc-55a9-ada2-9ca85c920dba","html":"<p>When developing Angular app with firebase, I usually update the database security rules in the firebase dashboard. Here’s a sample</p>\n<p><img src=\"/images/deployfirebase.png\"></p>\n<p>Here I allow the reading of data in my “users” node so that it can be access by anyone without being authenticated.</p>\n<p>It worked as expected.</p>\n<p>Now, I was ready to deploy it in firebase, so I did a production build first then type the command in the command prompt</p>\n<p><em>firebase deploy</em></p>\n<p>Suddenly, my app stopped working! I can’t access the “users” node anymore. It was too late before I realized that I forgot to update the database.rules.json file in my project!</p>\n<p>The silver lining for this mistake is that my security rules is simple enough and I can recreate it immediately. But imagine what would happen if it is a complex security rules and thousands of users are already using it?! ( Well okay around 25-50 users ) That would be a disaster.</p>\n<p>Always think twice before pressing that ‘enter’ key when deploying and you will thank me later.</p>","fields":{"slug":"posts/note-to-myself-when-deploying-to-firebase","tagSlugs":["/tag/firebase/"]},"frontmatter":{"date":"2017-10-08T05:45:22.000Z","description":" When developing Angular app with firebase, I usually update the database security rules in the firebase dashboard. Here's a sample ...","tags":["firebase"],"title":"Note to myself when deploying to firebase"}}},"pageContext":{"slug":"posts/note-to-myself-when-deploying-to-firebase"}},"staticQueryHashes":["251939775","401334301","4072520377"]}