# bone-connect

> > 支持boneAPI的静态资源服务器

Latest version **0.0.26** (published 2015-02-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install bone-connect
pnpm add bone-connect
yarn add bone-connect
bun add bone-connect
```

## 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.0.26 |
| Published | 2015-02-08 |
| First published | 2014-10-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 14 |
| Known vulnerabilities | 0 (+8 in 5 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | wyicwx |
| Maintainers | wyicwx |

## Links

- npm: https://www.npmjs.com/package/bone-connect
- Repository: git@github.com:wyicwx/bone-connect
- Homepage: https://github.com/wyicwx/bone-connect
- Issues: https://github.com/wyicwx/bone-connect/issues
- npm.io page: https://npm.io/package/bone-connect

## Dependencies (14)

- [open](https://npm.io/package/open.md) 0.0.5
- [send](https://npm.io/package/send.md) ~0.10.1
- [async](https://npm.io/package/async.md) ~0.9.0
- [rewire](https://npm.io/package/rewire.md) ~2.1.3
- [connect](https://npm.io/package/connect.md) ~3.2.0
- [tiny-lr](https://npm.io/package/tiny-lr.md) ~0.1.5
- [chokidar](https://npm.io/package/chokidar.md) ~0.12.6
- [akostream](https://npm.io/package/akostream.md) 0.0.2
- [underscore](https://npm.io/package/underscore.md) ~1.7.0
- [portscanner](https://npm.io/package/portscanner.md) ~1.0.0
- [serve-index](https://npm.io/package/serve-index.md) ~1.3.1
- [serve-static](https://npm.io/package/serve-static.md) ~1.6.3
- [bone-compatible](https://npm.io/package/bone-compatible.md) 0.0.5
- [connect-livereload](https://npm.io/package/connect-livereload.md) ~0.4.0

## Recent versions

- 0.0.26 (latest) — 2015-02-08
- 0.0.25 — 2015-02-07
- 0.0.23 — 2015-01-26
- 0.0.22 — 2015-01-26
- 0.0.21 — 2015-01-26
- 0.0.20 — 2015-01-26
- 0.0.19 — 2014-11-25
- 0.0.18 — 2014-11-24
- 0.0.17 — 2014-11-24
- 0.0.15 — 2014-11-19
- 0.0.14 — 2014-11-19
- 0.0.13 — 2014-11-19
- 0.0.12 — 2014-11-16
- 0.0.11 — 2014-11-16
- 0.0.10 — 2014-11-16
- … 8 more at https://npm.io/package/bone-connect/versions

## README

# bone-connect
> 支持boneAPI的静态资源服务器

###安装
通过npm安装

```sh
$ npm install bone-connect
```

在你的`bonefile.js`里通过`bone.cli()`载入bone-connect模块

```js
var bone = require('bone');
var connect = require('bone-connect')({
	base: './dist'
});

bone.cli(connect);
```
通过命令`bone connect`启动静态服务器

###可选参数

```js
var connect = require('bone-connect');
var options = {
	port: 8000,
	host: '0.0.0.0',
	base: './',
	livereload: false	
};
bone.cli(connect(options));
```

#####port
指定监听的端口号
默认值为：8000

#####host
指定监听的ip
默认值为：0.0.0.0

#####base
指定根目录地址
默认值为：bonefile.js所在文件夹路径

#####livereload
启用[livereload](https://github.com/intesso/connect-livereload)功能
默认值为：false

**注**：命令行也支持修改参数

```sh
$ bone connect --port 8080 --base ./dist
```

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