terriajs-server
Advanced tools
Comparing version 1.1.3 to 1.2.0
@@ -86,2 +86,3 @@ /* jshint node: true */ | ||
console.log('Serving directory "' + argv.wwwroot + '" on port ' + argv.port + '.'); | ||
require('./convert').testGdal(); | ||
@@ -88,0 +89,0 @@ if (!exists(argv.wwwroot)) { |
@@ -11,2 +11,13 @@ /* jshint node: true */ | ||
router.testGdal = function() { | ||
// test doing 'something' with an empty GeoJSON object. It will either fail with ENOENT, or fail with OGR2OGR output. | ||
ogr2ogr({}).exec(function(error) { | ||
if ((error !== undefined) && error.message.match(/ENOENT/)) { | ||
console.log('Warning: ogr2ogr (gdal) is not installed or inaccessible, so the format conversion service will fail.'); | ||
} else { | ||
// GDAL is installed ok. | ||
} | ||
}); | ||
}; | ||
// provide conversion to geojson service | ||
@@ -13,0 +24,0 @@ // reguires install of gdal on server: sudo apt-get install gdal-bin |
{ | ||
"name": "terriajs-server", | ||
"version": "1.1.3", | ||
"version": "1.2.0", | ||
"description": "NodeJS server for TerriaJS, consisting of a CORS proxy, proj4 CRS lookup service, ogr2ogr conversion service, and express static server.", | ||
@@ -27,3 +27,3 @@ "main": "app.js", | ||
"cors": "^2.7.1", | ||
"express": "^4.13.3", | ||
"express": "^4.8.0", | ||
"formidable": "^1.0.17", | ||
@@ -30,0 +30,0 @@ "ogr2ogr": "^0.5.1", |
23284
450
Updatedexpress@^4.8.0