# @amitport/useful

> useful for koa+angular apps

Latest version **0.5.2** (published 2017-03-09) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @amitport/useful
pnpm add @amitport/useful
yarn add @amitport/useful
bun add @amitport/useful
```

Provides the command `useful`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.2 |
| Published | 2017-03-09 |
| First published | 2017-03-09 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | ^7.6 |
| Dependencies | 33 |
| Known vulnerabilities | 0 (+16 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Amit Portnoy |
| Maintainers | amitport |
| Keywords | http, server |

## Links

- npm: https://www.npmjs.com/package/@amitport/useful
- Repository: https://github.com/amitport/useful
- Issues: https://github.com/amitport/useful/issues
- npm.io page: https://npm.io/package/@amitport/useful

## Dependencies (33)

- [koa](https://npm.io/package/koa.md) ^2.0.0-alpha.8
- [etag](https://npm.io/package/etag.md) ^1.8.0
- [angular](https://npm.io/package/angular.md) ~1.5.11
- [webpack](https://npm.io/package/webpack.md) ^2.2.1
- [defaults](https://npm.io/package/defaults.md) ^1.0.3
- [koa-cash](https://npm.io/package/koa-cash.md) ^2.1.0
- [koa-send](https://npm.io/package/koa-send.md) ^3.3.0
- [lru-cache](https://npm.io/package/lru-cache.md) ^4.0.2
- [socket.io](https://npm.io/package/socket.io.md) ^1.7.3
- [css-loader](https://npm.io/package/css-loader.md) ^0.26.2
- [koa-logger](https://npm.io/package/koa-logger.md) ^2.0.1
- [koa-router](https://npm.io/package/koa-router.md) ^7.0.1
- [file-loader](https://npm.io/package/file-loader.md) ^0.10.1
- [html-loader](https://npm.io/package/html-loader.md) ^0.4.5
- [koa-compose](https://npm.io/package/koa-compose.md) ^3.2.1
- [koa-convert](https://npm.io/package/koa-convert.md) ^1.2.0
- [require-dir](https://npm.io/package/require-dir.md) ^0.3.1
- [angular-aria](https://npm.io/package/angular-aria.md) ~1.5.11
- [fast-memoize](https://npm.io/package/fast-memoize.md) ^2.2.0
- [style-loader](https://npm.io/package/style-loader.md) ^0.13.2
- [angular-route](https://npm.io/package/angular-route.md) ~1.5.11
- [koa-bodyparser](https://npm.io/package/koa-bodyparser.md) ^3.2.0
- [angular-animate](https://npm.io/package/angular-animate.md) ~1.5.11
- [angular-material](https://npm.io/package/angular-material.md) ^1.1.3
- [angular-messages](https://npm.io/package/angular-messages.md) ~1.5.11
- [angular-translate](https://npm.io/package/angular-translate.md) ^2.15.0
- [ngtemplate-loader](https://npm.io/package/ngtemplate-loader.md) ^1.3.1
- [html-webpack-plugin](https://npm.io/package/html-webpack-plugin.md) ^2.28.0
- [koa-conditional-get](https://npm.io/package/koa-conditional-get.md) ^2.0.0
- [clean-webpack-plugin](https://npm.io/package/clean-webpack-plugin.md) ^0.1.15
- [webpack-dev-middleware](https://npm.io/package/webpack-dev-middleware.md) ^1.10.1
- [extract-text-webpack-plugin](https://npm.io/package/extract-text-webpack-plugin.md) ^2.0.0
- [script-ext-html-webpack-plugin](https://npm.io/package/script-ext-html-webpack-plugin.md) ^1.7.1

## Recent versions

- 0.5.2 (latest) — 2017-03-09
- 0.5.1 — 2017-03-09
- 0.5.0 — 2017-03-09

## README

# useful-http [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url]
> a useful http server


## Install

```sh
$ npm install --save useful-http
```


## Usage

```js
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](https://github.com/amitport)


[npm-image]: https://badge.fury.io/js/useful-http.svg
[npm-url]: https://npmjs.org/package/useful-http
[travis-image]: https://travis-ci.org/amitport/useful-http.svg?branch=master
[travis-url]: https://travis-ci.org/amitport/useful-http
[daviddm-image]: https://david-dm.org/amitport/useful-http.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/amitport/useful-http

---
_Source: https://npm.io/package/@amitport/useful · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
