Best way to install ghost

Ghost is a nice blogging platform based on ember.js and running on node.js.
During the configuration of this machine I have found a lot of issues in the install steps described on the official github page.
After different tries I've found that you can also install Ghost as an NPM module, so aI decided to give it a try.
Here are the steps that I followed:

  • Create your npm app with
npm init
- Configure the dev in the package.json file
  "main": "app.js",
  "dependencies": {
    "ghost": "latest"
, ...}
- Install everything with
npm install
- Create your app.js file as this one
  var ghost = require('ghost');
  ghost().then(function (ghostServer) {
  • change the configuration in ./node_modules/ghost/config.js to match your website parameters

  • install pm2 globally using

npm install -g pm2
  • set your environment as production
export NODE_ENV=production

-run your app with pm2

pm2 start app.js

After this you will be able to see the blog @ the address configured in the config file.

Hope this help someone

Davide Andreazzini

Read more posts by this author.