Hi want to add ghost into my existing express project,
is there a way to export ghost as a module and then use it in an express route?
what i’m looking for is like this:
Ghost is not intended to be usable as an express module. It should be run as a separate application and served on /blog by setting up your web server proxies accordingly.
var ghost = require('ghost')
module.exports.setup = async function (app) {
return new Promise((resolve,reject) => {
ghost().then(function (ghostServer) {
app.use('/', ghostServer.rootApp);
resolve('done');
})
.catch(e => reject(e));
})
};
and it works perfectly, running on subdomain.localhost:8080,
now how to set domain ? because every link goes to http://localhost:2368/
i want to set domain programmatically , and prevent ghost from running on port 2368