Browse Source

ES5 syntax

pull/1168/head
Gibran Parvez 7 years ago
parent
commit
dc5954bf40
  1. 12
      app.js
  2. 2
      config/swagger.js

12
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 ----------------------- **/

2
config/swagger.js

@ -1,4 +1,4 @@
const options = {
var options = {
'swaggerDefinition' : {
'info': {
'description': 'Swagger documentation for Pelias API',

Loading…
Cancel
Save