0.4.0 • Published 8 years ago

useful-http v0.4.0

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
8 years ago

useful-http NPM version Build Status Dependency Status

a useful http server

Install

$ npm install --save useful-http

Usage

var usefulHttpBuilder = require('useful-http');

httpServer = usefulHttpBuilder(
      {
        staticDirs: ['some-static-dir'],
        serverPagesDir: 'server-pages-dir',
        robots: 'Disallow: /',
        httpLogStream: {write: () => {}}
      }
    )
      .configureSecurity()
      .handleRobots()
      .log()
      .compress()
      .serveFonts()
      .renderIndex()
      .parseBody()
      .serveStatic()
      .handleErrors()
    .build();

// got a useful node http server that is built using express

// start listening on port 8080
httpServer.listen(8080, cb);

// can close
httpServer.close(cb);

License

Apache-2.0 © Amit Portnoy

0.4.0

8 years ago

0.3.6

9 years ago

0.3.5

10 years ago

0.3.4

10 years ago

0.3.3

10 years ago

0.3.2

10 years ago

0.3.1

10 years ago

0.2.0

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago