Configure Ghost to Run in Either Development or Production

Ghost blog can be run in multiple modes, two of the most useful modes are development or production (unless you are core ghost developer, you would not be using testing mode).

Each of these modes can be configured differently. In fact, you can use different databases in two different modes. Most often, SQLite3 is used in development mode but MySQL is used in production.

To start Ghost blog in development mode, you can start ghost application similar to normal Node.js webapp by using following command.

$ npm start

To start Ghost blog in production mode, use following command. Please notice the additional parameter passed.

$ npm start --production

If you are using PM2 in your production server, you can start Ghost blog in production mode by using following command.

$ NODE_ENV=production pm2 start index.js --name "Ghost"

Leave a Reply

Your email address will not be published. Required fields are marked *