Here is how to run Ghost as middleware in a /blog
setup.
- Create a new app (or add ghost to your existing express app)
npm install express ghost
-
Copy the
node_modules/ghost/content/
folder to your app's folder ascontent/
-
Configure the include
ghost-config.js
file. It's important to make sure your ghost URLs end with/blog/
as that lets the CSS, JS, whatnot match up. -
Download
ghost-in-the-middle.js
from this gist and download it to your app's root folder. -
Use the included
index.js
to see how to include Ghost