Add Windshaft-cartodb version to the /version route

This commit is contained in:
Sandro Santilli
2012-10-15 17:03:57 +02:00
parent 20dca2e8f8
commit ab8cb5bbb3
2 changed files with 37 additions and 0 deletions
+8
View File
@@ -26,6 +26,14 @@ var CartodbWindshaft = function(serverOptions) {
// boot
var ws = new Windshaft.Server(serverOptions);
// Override getVersion to include cartodb-specific versions
var wsversion = ws.getVersion;
ws.getVersion = function() {
var version = wsversion();
version.windshaft_cartodb = require('../../package.json').version;
return version;
}
/**
* Helper to allow access to the layer to be used in the maps infowindow popup.
*/