Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hexojs/hexo-server
Server module for Hexo.
https://github.com/hexojs/hexo-server
hexo hexo-plugin javascript
Last synced: 6 days ago
JSON representation
Server module for Hexo.
- Host: GitHub
- URL: https://github.com/hexojs/hexo-server
- Owner: hexojs
- License: mit
- Created: 2014-07-23T06:29:42.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-04-23T18:35:14.000Z (8 months ago)
- Last Synced: 2024-04-23T20:30:57.085Z (8 months ago)
- Topics: hexo, hexo-plugin, javascript
- Language: JavaScript
- Homepage:
- Size: 871 KB
- Stars: 78
- Watchers: 16
- Forks: 53
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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/