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

billy-http-express

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

billy-http-express

A Billy service that creates an Express 4 HTTP server

  • 1.1.0
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

billy-http-express

Build Status NPM version

A Billy service that creates an Express 4 HTTP server.

Install

$ npm install billy-http-express

Usage

var Application = require('billy').Application;
var HttpService = require('billy-http-express');

var app = new Application();
app.service(HttpService);
app.config('http.port', 50123);

app.start();

The actual server is started after all services have been loaded, so registering any middleware or setting up of express should happen after this service via the http dependencies.

function MyService(http)
{
  http.use(cookieParser());
}

This can be done in a separate service following this one, or via specifying a module via the http.server config.

Injectables

New dependencies that you can use after adding this service:

tagtypedescriptionnotes
httpexpressThe express applicationSetup routes, middleware, etc with this object

Configs

New dependencies that you can use after adding this service:

configtypedescriptiondefault valuenotes
http.portnumberPort to listen on for HTTP connectionsprocess.env.PORT, 8123 1
http.secretstringServer-side secret'supersecret'Used for securing cookies.
http.webrootstringPath to directory of static files to servenullOptional. If not set, will not start the static server.
http.serverfunctionServer startup modulenullOptional IoC-injected module to start after registering server.

1 Will use the PORT environment variable if available, e.g. on Heroku.

Tern Support

The source files are all decorated with JSDoc3-style annotations that work great with the Tern code inference system. Combined with the Node plugin (see this project's .tern-project file), you can have intelligent autocomplete for methods in this library.

Testing

Testing is done with Tape and can be run with the command npm test.

Testing is done with Travis CI.

License

Copyright 2014 Brandon Valosek

billy-http-express is released under the MIT license.

Keywords

FAQs

Package last updated on 28 May 2014

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