Use routes configuration to create and mount routes and controllers

This commit is contained in:
Daniel García Aubert
2018-05-09 14:59:21 +02:00
parent 7ed819e84a
commit 9feea66550
8 changed files with 171 additions and 58 deletions
+21 -7
View File
@@ -32,28 +32,42 @@ var config = {
//
// See https://github.com/CartoDB/Windshaft-cartodb/wiki/Unified-Map-API
,routes: {
api: {
// "/tiles" is for compatibility with versions up to 1.6.x
v1: {
paths: [
'/api/v1',
'/user/:user/api/v1',
'/tiles' // for compatibility with versions up to 1.6.x
],
// Base url for the Detached Maps API
// "maps" is the the new API,
// "tiles/layergroup" is for compatibility with versions up to 1.6.x
// "/api/v1/map" is the new API,
map: {
paths: [
'/map',
'/layergroup'
]
},
// Base url for the Templated Maps API
// "/api/v1/map/named" is the new API,
template: {
paths: [
'/map/named'
]
}
},
// For compatibility with versions up to 1.6.x
v0: {
paths: [
'/tiles'
],
// Base url for the Detached Maps API
// "/tiles/layergroup" is for compatibility with versions up to 1.6.x
map: {
paths: [
'/layergroup'
]
},
// Base url for the Templated Maps API
// "/tiles/template" is for compatibility with versions up to 1.6.x
template: {
paths: [
'/map/named',
'/template'
]
}