# serve-ify

> serve browserify app

Latest version **1.0.3** (published 2016-03-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install serve-ify
pnpm add serve-ify
yarn add serve-ify
bun add serve-ify
```

Provides the command `serve-ify`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2016-03-19 |
| First published | 2016-03-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Mikey |
| Maintainers | ahdinosaur |

## Links

- npm: https://www.npmjs.com/package/serve-ify
- Repository: https://github.com/ahdinosaur/serve-ify
- Homepage: https://github.com/ahdinosaur/serve-ify#readme
- Issues: https://github.com/ahdinosaur/serve-ify/issues
- npm.io page: https://npm.io/package/serve-ify

## Dependencies (10)

- [bole](https://npm.io/package/bole.md) ^2.0.0
- [bankai](https://npm.io/package/bankai.md) ^2.0.2
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [sheetify](https://npm.io/package/sheetify.md) ^5.0.0
- [pull-http](https://npm.io/package/pull-http.md) ^1.0.1
- [browserify](https://npm.io/package/browserify.md) ^13.0.0
- [http-ndjson](https://npm.io/package/http-ndjson.md) ^3.0.0
- [pull-stream](https://npm.io/package/pull-stream.md) ^3.2.0
- [server-router](https://npm.io/package/server-router.md) ^1.1.5
- [server-summary](https://npm.io/package/server-summary.md) ^5.0.1

## Recent versions

- 1.0.3 (latest) — 2016-03-19
- 1.0.2 — 2016-03-19
- 1.0.1 — 2016-03-19
- 1.0.0 — 2016-03-19

## README

# serve-ify

serve [browserify](http://browserify.org) apps using [bankai](https://github.com/yoshuawuyts/bankai)

```shell
npm install --save serve-ify
```

## cli

### `serve-ify src [options]`

given:

- `src`: a `String` path to your app's entry file
- `options` an `options` that corresponds to
  - `options.port`: the port passed into [`server.listen`](https://nodejs.org/api/http.html#http_server_listen_port_hostname_backlog_callback), defaults to `4000`
  - `options.logLevel`: the `level` passed into [`bole.output`](https://github.com/rvagg/bole#boleoutput)
  - `options.html`: passed [as `opts` to `bankai.html`](https://github.com/yoshuawuyts/bankai#bankaihtmlopts)
  - `options.css`: passed [as `opts` to `bankai.css`](https://github.com/yoshuawuyts/bankai#bankaicssopts)
  - `options.js`: passed [as `opts` to `bankai.js`](https://github.com/yoshuawuyts/bankai#bankaijsopts)

```shell
serve-ify ./client.js --port 4000 --logLevel=debug
```

## api

### `serveIfy = require('serve-ify')`

### `requestListener = serveIfy(src, options)`

given:

- `src`: a `String` path to your app's entry file
- `options` an `options` that corresponds to
  - `options.html`: passed [as `opts` to `bankai.html`](https://github.com/yoshuawuyts/bankai#bankaihtmlopts)
  - `options.css`: passed [as `opts` to `bankai.css`](https://github.com/yoshuawuyts/bankai#bankaicssopts)
  - `options.js`: passed [as `opts` to `bankai.js`](https://github.com/yoshuawuyts/bankai#bankaijsopts)

returns

- [`requestListener`](https://nodejs.org/api/http.html#http_event_request) to be passed into [`http.createServer`](https://nodejs.org/api/http.html#http_http_createserver_requestlistener), as in it accept two argument: `req` and `res`.

```js
const serveIfy = require('serve-ify')
const http = require('http')
const summary = require('server-summary')

const src = __dirname + '/client.js'
const requestListener = serveIfy(src)
const server = http.createServer(requestListener)

const port = 4000
server.listen(port, summary(server))
```

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