wherever

0.5.2 • Public • Published

wherever

npm version npm downloads

Tiny static web server.

安装

npm install -g wherever

使用

wherever --help
wherever [options]

选项:
  -p, --port     端口号                                    [数字] [默认值: 3000]
  -r, --root     根目录(相对路径)                      [字符串] [默认值: "./"]
  -s, --server   静态资源服务器模式                       [布尔] [默认值: false]
  -o, --open     打开网页                                 [布尔] [默认值: false]
  -c, --config   配置文件
      --version  显示版本号                                               [布尔]
      --help     显示帮助信息                                             [布尔]

配置文件格式

{
  "port": 3000,
  "root": "./",
  "historyApiFallback": "index.html",
  "proxy": {
    "/api": {
      "target": "https://api.github.com",
      "changeOrigin": true,
      "pathRewrite": {
        "^/api": ""
      }
    }
  }
}
  • 支持接口代理;

Package Sidebar

Install

npm i wherever

Weekly Downloads

23

Version

0.5.2

License

MIT

Unpacked Size

13.4 kB

Total Files

7

Last publish

Collaborators

  • coyeah