bummmble-hive

0.1.3 • Public • Published

CircleCI Maintainability code style: prettier Open Source Love

Hive

Hive is a centralized, Express HTTP Server to be used as a starting point for building modern applications.

Installation

Install with the package manager of your choice easily. NPM is used below

npm install -S bummmble-hive

Features

  • A solid foundation for starting an Express project
  • Easily extensible and customizable middleware
  • Pretty Error handling via Pretty Error
  • A focus on security utilizing hpp and Helmet

Api

createServer

Takes some configuration and returns an Express Application instance

const server = createServer({
    // Static config determines where you want to serve your files from
    // public: is where the files are located
    // path: is your static path to request
    staticConfig: {
        public: 'build/client',
        path: '/static'
    },

    // After security takes an array of middleware to be added after the security middleware is added
    afterSecurity: [],

    // Before fallback functions the same as afterSecurity, but adds the middleware after the fallback middleware near the end
    afterFallback: [],

    // A boolean that determines whether a unique nonce should be added to the response object
    enableNonce: false

    // A boolean that determines whether Content Security Policy should be enabled
    enableCSP: false
});

Readme

Keywords

none

Package Sidebar

Install

npm i bummmble-hive

Weekly Downloads

2

Version

0.1.3

License

MIT

Last publish

Collaborators

  • bashkir