🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

ghost-express-server

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ghost-express-server

ghost creative express.js server

2.5.5
latest
Version published
Weekly downloads
1
-97.96%
Maintainers
2
Weekly downloads
 
Created

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

FAQs

Package last updated on 09 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts