CartoDB-SQL-API/app/models/formats/index.js

18 lines
415 B
JavaScript
Raw Normal View History

2013-05-16 17:24:52 +08:00
//
// 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' ) {
2013-05-16 17:24:52 +08:00
var format = require(folder + file);
formats[format.prototype.id] = format;
2013-05-16 17:24:52 +08:00
}
});
module.exports = formats;