Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@colucom/osseus-server

Package Overview
Dependencies
Maintainers
3
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@colucom/osseus-server

Osseus server

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
25
increased by2400%
Maintainers
3
Weekly downloads
 
Created
Source

JavaScript Style Guide

Osseus Server

express based osseus web server module

Install

$ npm install @colucom/osseus-server

Usage

Configuration

Mandatory:

  • OSSEUS_SERVER_PORT

Optional:

  • OSSEUS_SERVER_REQUEST_ID_HEADER
  • OSSEUS_SERVER_MAINTENANCE_ENABLED
    • set to true to enable maintenance mode on server
  • OSSEUS_SERVER_MAINTENANCE_MESSAGE
    • maintenance message sent to clients when maintenance mode is enabled
  • OSSEUS_SERVER_MAINTENANCE_OVERRIDE_HEADER
    • bypass maintenance mode with this header
  • OSSEUS_SERVER_ALLOWED_IP
    • list of ip addresses allowed to bypass maintenance mode
  • OSSEUS_SERVER_COMPRESION_ENABLED
  • OSSEUS_SERVER_COMPRESSION_LEVEL
  • OSSEUS_SERVER_NO_COMPRESSION_HEADER
    • don't compress responses with this request header
  • OSSEUS_SERVER_MORGAN_FORMAT
  • OSSEUS_SERVER_CORS_WHITELIST
  • OSSEUS_SERVER_STATIC_ENGINE_TYPE
  • OSSEUS_SERVER_VIEWS_FOLDER
  • OSSEUS_SERVER_STATIC_FOLDER
  • OSSEUS_SERVER_ADD_HEALTHCHECK
    • add /healthcheck endpoint which returns OK with status code 200
  • OSSEUS_SERVER_ADD_IS_RUNNING
    • add /is_running endpoint which returns OK with status code 200
Example

First, create index.js:

const Osseus = require('osseus')

const main = async () => {
	try {
		// init osseus
		const osseus = await Osseus.init()
  	} catch (err) {
		console.error(err)
  	}
}

main()

Running:

$ node index.js --OSSEUS_SERVER_PORT 8080

Will result in:

server is listening on port: 8080

Contributing

Please see contributing guidelines.

License

Code released under the MIT License.

FAQs

Package last updated on 27 Sep 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc