ghost-express-server

2.5.5 • Public • Published

Ghost Express Server

Installation

npm install ghost-express-server --save

Overview

Config (default listed below)

{
  "server": {
    "core": {
      "allowCrossDomain": false,
      "bodyParser": {
        "sizeLimit": "50mb",
        "extended": false
      },
      "enable": ["trust proxy"],
      "port": 4000
    },
 
    "error": {
      "dumpExceptions": true,
      "showStack": true
    },
 
    "logger": {
      "console": {
        "enabled": true,
        "json": true
      },
      "logentries": {
        "enabled": false,
        "token": "-- DEFAULT LOGENTRIES TOKEN --"
      }
    },
 
    "plugins": {
      "prerender": {
        "enabled": false,
        "token": "-- DEFAULT PRERENDER TOKEN --"
      }
    },
 
    "staticAssets": {
      "enabled": false,
      "directories": ["static", "files"]
    },
 
    "template": {
      "enabled": false
    }
  }
}

There are three steps to getting the server up and running.

1. Require

const GhostExpressServer = require('ghost-express-server');
// Easy enough

2. Create

GhostExpressServer.create(config)
.then(server => { ... }) 
// See config above

3. Start

GhostExpressServer.create(config)
.then(server => server.start()) 
// Make servers great again

Package Sidebar

Install

npm i ghost-express-server

Weekly Downloads

72

Version

2.5.5

License

ISC

Last publish

Collaborators

  • njgerner
  • pwerth