Coder Social home page Coder Social logo

create-servers's People

Contributors

3rd-eden avatar bcbailey-godaddy avatar donasaur avatar doublerebel avatar evanlucas avatar indexzero avatar jcrugzz avatar jpage-godaddy avatar kinetifex avatar renovate[bot] avatar swaagie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

create-servers's Issues

Ability to configure keepAliveTimeout

A common thing that servers may need customized is keepAliveTimeout. Presently you'd have to mutate that property on the returned server objects. Could it be useful to set that via the config parameters passed into createServers?

Unify the servers response

create-servers allows you to configure a single http server using the object syntax or multiple http server instances using an array with objects where each object the configuration for each server. While that is a nice feature to have it comes with a really painful side effect and that is that the response signature of the module changes based on the configuration. When the servers are configured using just a single object to create a single server the servers response would be:

{
  http: { http server }
}

But when you are providing create-servers with an array of multiple configurations, the response signature magically changes to an array:

{
  http: [
    { http server 1 },
    { http server 2 }
  ]
}

So in order to handle both formats, implementers of this library need to support both cases, and normalise it into workable format for their library. What I like to propose instead is that the create-servers changes it's response signature to be consistent between both configuration modes (array and object).

One way of doing this would be to return an object that is keyed on the address of the server instead of separate distinction between http, https, and then the multiple or single server that is created. So in the case of multiple servers, there would simply be more keys in the object allowing the signature to be the same.

{
  80: { http server },
  8080: { http server },
  443: { http server } 
}

Use `read-ssl`

We shouldn't use fs.readFileSync. That being said it's part of the startup flow and what are you doing before your https server listens that's so important? What are you? The space pope or something?

Error: Unspecified error

When creating an HTTPS server and starting it without root access. The callback receives an error Unspecified error instead of useful debugging message that states why the server creation has failed.

If there are multiple failures, the error message should default to the first error that it encountered.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.