CartoDB-SQL-API/app/models/formats/index.js
Sandro Santilli 76705a3fd7 Refactor format objects to expose a common stream-able interface
See app/models/formats/README for info
2013-05-28 10:36:15 +02:00

18 lines
415 B
JavaScript

//
// load all the formats
//
//
var formats = {}
var path = require('path');
var folder = __dirname + "/"
//"./app/models/formats/"
require("fs").readdirSync(folder).forEach(function(file) {
if (path.extname(file) === '.js' && file !== 'index.js' && file !== 'ogr.js' && file !== 'pg.js' ) {
var format = require(folder + file);
formats[format.prototype.id] = format;
}
});
module.exports = formats;