If you know anything about Ghost development surely you know Ghost is based with the Express framework over the Node.js server.
You can put it all together and play with all this stuff.
Let's see how.
Ghost is available as Node module in the Npm repository and the solution is as easy as install the needed modules.
You can see in the dependencies section how the two required packaged were added in the descriptive package.json file.
Here we decided to use an explicit version of the Express module instead the used inside the Ghost module but nothing forbids you to import any module already included in the Ghost project, or any other module, inside your code with a line like
And here comes the magic!
In order to run only a server including the Ghost and your own module. In the script file that runs the app in our case, you should force your app to use and share the same process that starts the blog engine:
This is the index.js
That's the trick! 💡