mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
28 lines
707 B
JavaScript
28 lines
707 B
JavaScript
// DEPRECATED BUT STILL ACTIVE
|
|
|
|
// import path from 'path';
|
|
import swagger from 'swagger-node-express';
|
|
// import shared from '../../../../common';
|
|
import express from 'express';
|
|
import analytics from './analytics';
|
|
import responseHandler from './response';
|
|
|
|
const v2app = express();
|
|
|
|
// re-set the view options because they are not inherited from the top level app
|
|
v2app.set('view engine', 'jade');
|
|
v2app.set('views', `${__dirname}/../../../views`);
|
|
|
|
v2app.use(analytics);
|
|
v2app.use(responseHandler);
|
|
|
|
|
|
// Custom Directives
|
|
v2app.use('/', require('../../routes/api-v2/auth'));
|
|
|
|
require('../../routes/api-v2/swagger')(swagger, v2app);
|
|
|
|
v2app.use(require('../api-v2/errorHandler'));
|
|
|
|
module.exports = v2app;
|