Skip to content

Instantly share code, notes, and snippets.



Created Nov 28, 2012
What would you like to do?
Hello World Firebase
+1 with firebase. now you just need to write a node app with regression logic
that listens to each new vote on each post and tracks value history to ignore and reset
any malicious db.set(0)'s people run in console when they find this completely
public script on your site. (Firebase is working on their security).
<script src="//"></script>
<script type='text/javascript' src=''></script>
<script type="text/javascript">
var post = "some-post-slug";
var db = new Firebase(''+ post + '/votes');
function(votes) { return votes + 1; },
function(success, data) { console.log(success); }
<span id="votes"></span><br><br>
<a href="javascript:void(0)" id="add">add</a><br/>
<a href="javascript:void(0)" id="reset">reset</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.