ser-here

0.1.4 • Public • Published

serhere 随启随用的静态文件服务器 + 假数据

it's a fork of anywhere

Running static file server serhere and auto router to ther mock data(ajax). 随时随地将你的当前目录变成一个静态文件服务器的根目录 + mock假数据(ajax)。

Installation

Install it as a command line tool via npm -g.

npm install ser-here -g

Execution

$ serhere
// or with port 或者给它一个可用的端口
$ serhere -p 8000
// or start it but silent(don't open browser)  启动但不打开浏览器
$ serhere -s
// or with hostname 指定主机名
$ serhere -h localhost -p 8888
// or with folder  指定启动的目录
$ serhere -d ~/git/serhere
// or enable html5 history
$ serhere -f /index.html

Help

$ serhere --help
Usage:
  serhere --help // print help information
  serhere // 8000 as default port, current folder as root
  serhere 8888 // 8888 as port
  serhere -p 8989 // 8989 as port
  serhere -s // don't open browser
  serhere -h localhost // localhost as hostname
  serhere -d /home // /home as root
  serhere -f /index.html  // Enable html5 history,the index is /index.html

Visit

http://localhost:8000

执行命令后,默认浏览器将为您自动打开主页。

License

The MIT license.

Package Sidebar

Install

npm i ser-here

Weekly Downloads

5

Version

0.1.4

License

MIT

Unpacked Size

1.85 MB

Total Files

24

Last publish

Collaborators

  • tsloveme