first commit
This commit is contained in:
18
app/controllers/version_controller.js
Normal file
18
app/controllers/version_controller.js
Normal file
@@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
var version = {
|
||||
cartodb_sql_api: require(__dirname + '/../../package.json').version
|
||||
};
|
||||
|
||||
function VersionController() {
|
||||
}
|
||||
|
||||
VersionController.prototype.route = function (app) {
|
||||
app.get(global.settings.base_url + '/version', this.handleVersion.bind(this));
|
||||
};
|
||||
|
||||
VersionController.prototype.handleVersion = function (req, res) {
|
||||
res.send(version);
|
||||
};
|
||||
|
||||
module.exports = VersionController;
|
||||
Reference in New Issue
Block a user