0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00
ghost/core/server/web/parent/backend.js
Hannah Wolfe 12aff14dff Removed oauth experiment
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
2022-05-16 17:37:13 +01:00

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;
};