diff --git a/app.js b/app.js index 2b8fbb86..369ed3f3 100644 --- a/app.js +++ b/app.js @@ -1,7 +1,7 @@ -const app = require('express')(); -const swaggerJSDoc = require('swagger-jsdoc'); -const swaggerUi = require('express-swaggerize-ui'); -const peliasConfig = require( 'pelias-config' ).generate(require('./schema')); +var app = require('express')(); +var swaggerJSDoc = require('swagger-jsdoc'); +var swaggerUi = require('express-swaggerize-ui'); +var peliasConfig = require( 'pelias-config' ).generate(require('./schema')); if( peliasConfig.api.accessLog ){ app.use( require( './middleware/access_log' ).createAccessLogger( peliasConfig.api.accessLog ) ); @@ -27,10 +27,10 @@ app.use( require('./middleware/jsonp') ); /** ----------------------- routes ----------------------- **/ -const defaultRoutes = require('./routes/default'); +var defaultRoutes = require('./routes/default'); defaultRoutes.addRoutes(app); -const v1 = require('./routes/v1'); +var v1 = require('./routes/v1'); v1.addRoutes(app, peliasConfig); /** ----------------------- error middleware ----------------------- **/ diff --git a/config/swagger.js b/config/swagger.js index cc35e049..0e249d7d 100644 --- a/config/swagger.js +++ b/config/swagger.js @@ -1,4 +1,4 @@ -const options = { +var options = { 'swaggerDefinition' : { 'info': { 'description': 'Swagger documentation for Pelias API',