Skip to content

Instantly share code, notes, and snippets.

@KaySchneider
Last active December 26, 2018 16:29
Show Gist options
  • Save KaySchneider/b1724bad5f42cfbf4db86527e2636c13 to your computer and use it in GitHub Desktop.
Save KaySchneider/b1724bad5f42cfbf4db86527e2636c13 to your computer and use it in GitHub Desktop.
Simple wrapper to run ghost as npm module. To run it inside the GAE flexible environment. And an example package.json for ghost as npm package
'use strict';
const ghost = require('ghost');
const port = process.env.PORT || 8080;
ghost().then(function (ghostServer) {
ghostServer.rootApp.listen(port);
});
{
"name": "ghostappengine",
"version": "1.0.0",
"description": "",
"main": "index.js",
"engines": {
"node": "6.x"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "NODE_ENV=production node index.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.16.3",
"ghost": "^2.9.1",
"ghost-google-cloud-storage-new": "^1.1.2",
"knex-migrator": "^3.2.4",
"mysql": "^2.15.0",
"prompt": "^1.0.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment