Rename sqlapi.host configuration to sqlapi.domain. Closes #79.
Support for "host" is retained for backward compatibility.
This commit is contained in:
parent
db951234aa
commit
633e8d164b
4
NEWS.md
4
NEWS.md
@ -1,5 +1,9 @@
|
|||||||
1.3.4
|
1.3.4
|
||||||
------
|
------
|
||||||
|
|
||||||
|
NOTE: configuration sqlapi.host renamed to sqlapi.domain
|
||||||
|
(support for "sqlapi.host" is retained for backward compatibility)
|
||||||
|
|
||||||
* Improve empty CartoCSS error message
|
* Improve empty CartoCSS error message
|
||||||
* Improve invalid mapnik-geometry-type CSS error message
|
* Improve invalid mapnik-geometry-type CSS error message
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ var config = {
|
|||||||
}
|
}
|
||||||
,sqlapi: {
|
,sqlapi: {
|
||||||
protocol: 'http',
|
protocol: 'http',
|
||||||
host: 'localhost.lan',
|
domain: 'localhost.lan',
|
||||||
port: 8080,
|
port: 8080,
|
||||||
version: 'v1'
|
version: 'v1'
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ var config = {
|
|||||||
}
|
}
|
||||||
,sqlapi: {
|
,sqlapi: {
|
||||||
protocol: 'https',
|
protocol: 'https',
|
||||||
host: 'cartodb.com',
|
domain: 'cartodb.com',
|
||||||
port: 8080,
|
port: 8080,
|
||||||
version: 'v2'
|
version: 'v2'
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ var config = {
|
|||||||
}
|
}
|
||||||
,sqlapi: {
|
,sqlapi: {
|
||||||
protocol: 'https',
|
protocol: 'https',
|
||||||
host: 'cartodb.com',
|
domain: 'cartodb.com',
|
||||||
port: 8080,
|
port: 8080,
|
||||||
version: 'v2'
|
version: 'v2'
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ var config = {
|
|||||||
}
|
}
|
||||||
,sqlapi: {
|
,sqlapi: {
|
||||||
protocol: 'http',
|
protocol: 'http',
|
||||||
host: '',
|
domain: '',
|
||||||
// This port will be used by "make check" for testing purposes
|
// This port will be used by "make check" for testing purposes
|
||||||
// It must be available
|
// It must be available
|
||||||
port: 1080,
|
port: 1080,
|
||||||
|
@ -8,6 +8,9 @@ var _ = require('underscore')
|
|||||||
, LZMA = require('lzma/lzma_worker.js').LZMA
|
, LZMA = require('lzma/lzma_worker.js').LZMA
|
||||||
;
|
;
|
||||||
|
|
||||||
|
// This is for backward compatibility with 1.3.3
|
||||||
|
if ( ! global.environment.sqlapi.domain ) global.environment.sqlapi.host;
|
||||||
|
|
||||||
module.exports = function(){
|
module.exports = function(){
|
||||||
|
|
||||||
var rendererConfig = _.defaults(global.environment.renderer || {}, {
|
var rendererConfig = _.defaults(global.environment.renderer || {}, {
|
||||||
@ -62,7 +65,7 @@ module.exports = function(){
|
|||||||
var api = global.environment.sqlapi;
|
var api = global.environment.sqlapi;
|
||||||
|
|
||||||
// build up api string
|
// build up api string
|
||||||
var sqlapi = api.protocol + '://' + username + '.' + api.host + ':' + api.port + '/api/' + api.version + '/sql'
|
var sqlapi = api.protocol + '://' + username + '.' + api.domain + ':' + api.port + '/api/' + api.version + '/sql'
|
||||||
|
|
||||||
var qs = { q: sql }
|
var qs = { q: sql }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user