turing-server

0.50.0 • Public • Published

turing-server

version license

An express server.

API

The turing-server simply wraps an express app and provides a start method on it for easily starting the server.

const TuringServer = require('turing-server');

class MyApp extends TuringServer {
  constructor() {
    // do your express stuff here - config, routing, middleware, ...
  }
}

new MyApp().start();

Config

  • turing:server:onlyIPv4 (optional) - If set to true server will only serve ipv4 addresses and therefor not add ::ffff: prefix to ipv4 addresses. (default: "false")

  • turing:server:port (optional) - The server port. (default: "3000")

  • turing:logging:accesslog:enabled (optional) - Disable/Enable access logging. (default: true)

  • turing:logging:accesslog:format (optional) - The morgan accesslog format (default: ":remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length] ":referrer" ":user-agent" :response-time")

  • turing:logging:accesslog:meta (optional) - Object of additional key-value pairs for each log entry. (default: {})

  • turing:logging:accesslog:skipHealthUrl (optional) - Disable/Enable access logging of health url access. (default: "false")

  • turing:logging:accesslog:skipStatusUrl (optional) - Disable/Enable access logging of status url access. (default: "false")

Contributors

  • Benedikt Stemmildt
  • Jonathan Meyer

License

Apache-2.0

Readme

Keywords

none

Package Sidebar

Install

npm i turing-server

Weekly Downloads

4

Version

0.50.0

License

Apache-2.0

Last publish

Collaborators

  • benestem
  • jmeyer