mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
12aff14dff
refs: https://github.com/TryGhost/Team/issues/1625 - this didn't work the way we wanted to - removing this will free up the namespaces to start over
21 lines
705 B
JavaScript
21 lines
705 B
JavaScript
const debug = require('@tryghost/debug')('web:backend');
|
|
const express = require('../../../shared/express');
|
|
const {BASE_API_PATH} = require('../../../shared/url-utils');
|
|
|
|
/**
|
|
*
|
|
* @returns {import('express').RequestHandler}
|
|
*/
|
|
module.exports = () => {
|
|
debug('BackendApp setup start');
|
|
// BACKEND
|
|
// Wrap the admin and API apps into a single express app for use with vhost
|
|
const backendApp = express('backend');
|
|
|
|
backendApp.lazyUse(BASE_API_PATH, require('../api'));
|
|
backendApp.lazyUse('/ghost/.well-known', require('../well-known'));
|
|
|
|
backendApp.use('/ghost', require('../../services/auth/session').createSessionFromToken, require('../admin')());
|
|
|
|
return backendApp;
|
|
};
|