Skip to content

Instantly share code, notes, and snippets.

@formula1
formula1 / db.js
Last active January 25, 2016 05:21 — forked from nsuan/announce.php
Bitstorm Tracker
var fs = require('fs');
/*
* Yeah, this is the database engine. It's pretty bad, uses files to store peers.
* Should be easy to rewrite to use SQL instead.
*
* Yes, sometimes collisions may occur and screw the DB over. It might or might not
* recover by itself.
*/
var DB;