# hexo-server

> Server module of Hexo.

Latest version **3.0.0** (published 2022-01-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install hexo-server
pnpm add hexo-server
yarn add hexo-server
bun add hexo-server
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2022-01-03 |
| First published | 2014-12-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=12.13.0 |
| Dependencies | 8 |
| Unpacked size | 11.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 81 |
| Author | Tommy Chen |
| Maintainers | ertrzyiks, abnerchou, tommy351, hexobot, jlhwung, tomap, curben, yoshinorin |
| Keywords | hexo, server, connect |

## Links

- npm: https://www.npmjs.com/package/hexo-server
- Repository: https://github.com/hexojs/hexo-server
- Homepage: http://hexo.io/
- Issues: https://github.com/hexojs/hexo-server/issues
- npm.io page: https://npm.io/package/hexo-server

## Dependencies (8)

- [mime](https://npm.io/package/mime.md) ^3.0.0
- [open](https://npm.io/package/open.md) ^8.0.9
- [morgan](https://npm.io/package/morgan.md) ^1.9.1
- [connect](https://npm.io/package/connect.md) ^3.7.0
- [bluebird](https://npm.io/package/bluebird.md) ^3.5.5
- [picocolors](https://npm.io/package/picocolors.md) ^1.0.0
- [compression](https://npm.io/package/compression.md) ^1.7.4
- [serve-static](https://npm.io/package/serve-static.md) ^1.14.1

## Alternatives

- [postcss-color-hex-alpha](https://npm.io/package/postcss-color-hex-alpha.md) — 6.4M weekly downloads
- [randomcolor](https://npm.io/package/randomcolor.md) — 348.0K weekly downloads
- [bows](https://npm.io/package/bows.md) — 1.3K weekly downloads
- [ep_prefer_color_scheme](https://npm.io/package/ep_prefer_color_scheme.md) — 260 weekly downloads
- [coc-yank](https://npm.io/package/coc-yank.md) — 61 weekly downloads

## Recent versions

- 3.0.0 (latest) — 2022-01-03
- 2.0.0 — 2020-08-09
- 1.0.0 — 2019-09-02
- 0.3.3 — 2018-08-26
- 0.3.2 — 2018-05-05
- 0.3.1 — 2018-01-02
- 0.3.0 — 2017-12-18
- 0.2.2 — 2017-07-27
- 0.2.1 — 2017-06-06
- 0.2.0 — 2016-02-13
- 0.1.3 — 2015-12-13
- 0.1.2 — 2015-02-05
- 0.1.1 — 2015-01-31
- 0.1.0 — 2015-01-27
- 0.0.4 — 2015-01-17
- … 3 more at https://npm.io/package/hexo-server/versions

## README

# hexo-server

[![Build Status](https://github.com/hexojs/hexo-server/workflows/Tester/badge.svg)](https://github.com/hexojs/hexo-server/actions?query=workflow%3ATester)
[![NPM version](https://badge.fury.io/js/hexo-server.svg)](https://www.npmjs.com/package/hexo-server)
[![Coverage Status](https://img.shields.io/coveralls/hexojs/hexo-server.svg)](https://coveralls.io/r/hexojs/hexo-server?branch=master)

Server module for [Hexo].

## Installation

``` bash
$ npm install hexo-server --save
```

## Usage

``` bash
$ hexo server
```

Option | Description | Default
--- | --- | ---
`-i`, `--ip` | Override the default server IP. | `::` when IPv6 is available, else `0.0.0.0` (note: in most systems, `::` also binds to `0.0.0.0`)
`-p`, `--port` | Override the default port. | 4000
`-s`, `--static` | Only serve static files. | false
`-l`, `--log [format]` | Enable logger. Override log format. | false
`-o`, `--open` | Immediately open the server url in your default web browser. | false

## Options

``` yaml
server:
  port: 4000
  log: false
  ip: 0.0.0.0
  compress: false
  cache: false
  header: true
  serveStatic:
    extensions:
    - html
```

- **port**: Server port
- **log**: Display request info on the console. Always enabled in debug mode.
- **ip**: Server IP
- **compress**: Enable GZIP compression
- **cache**: Enable cache for rendered content
  - This can speed up server response. However, any changes will no longer take effect in real time.
  - Suitable for production environment only.
- **header**: Add `X-Powered-By: Hexo` header
- **serveStatic**: Extra options passed to [serve-static](https://github.com/expressjs/serve-static#options)

## License

MIT

[Hexo]: http://hexo.io/

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