I’m trying to use Ghost as an express app and the logging does not seem to work. I have enabled transports: ["stdout", "file"] but the files are blank and nothing is on stdout.
Here’s how I am starting Ghost (modified from original index.js):
debug('Initialising Ghost');
ghost().then(function (ghostServer) {
// Mount our Ghost instance on our desired subdirectory path if it exists.
parentApp.use(urlService.utils.getSubdir(), ghostServer.rootApp);
ghostServer.logStartMessages();
});
createServer(parentApp).listen();
With the .logStartMessages() call above I see the startup messages (“press ctrl+c to stop”, etc) but nothing after that. Nothing in files or logs.
Is there something else that needs to be initialized? Any hints on using Ghost 3 as an express app?
The end result should be a Search feature (via express), a mostly static landing page, and the ghost blog on /blogs. I was wanting to compose them all as a single node application and route it through nginx unit for the benefits of TLS offloading, serving static content, etc.
I could certainly set up proxies, etc, for all of the above but I’ve found posts on these forums and other places that described using Ghost as an express app. I did not realize it was unsupported. It does seem to work without issue except that I see no logs.
Just as an update for future Googlers, Ghost as an express app and express apps with Ghost both work as expected and seems to be called out as a usage in the comments of ghost-server.js
The logging problem I seem to be having seems to be somehow related to nginx unit.