staticky v0.4.3
English | 简体中文
staticky
staticky is a better and simple static file server.You can use it and you can see static files on your cell phone and computer so easily.And when the file changes, it can automatically refresh the browser.
How to use
First use this command npm install staticky -g ,
then in your project's directory, you can use staticky ,
it can automatically open the index.html under this directory,
if index.html not exit, so it will display all the files in the directory.
Usage
Issue the command staticky in your project's directory. Alternatively you can add the path to serve as a command line parameter.
Command line parameters:
-por--portPort to use, defaults to 8091-nor--no-browserWhether to open browser automatically-tor--targetWhich the file open, defaults toindex.html-dor--dirWorking directory, defaults toprocess.cwd()-for--fallbackSupport single page Application-gor--gzipWhether the request accepts gzip encoding-ror--reloadFile or directory live reloaded, defauls totarget file, you can only selecttargetordir-hor--helpOutput usage information
notice: live reloaded only support text/html or text/markdown.
Examples
staticky -p 8000 // start static file server in port 8000
staticky -n // don't open browser automatically
staticky -t index.js // the index.js file will be opened
staticky -d src // the src directory under the current directory will be working directory
staticky -g // open gizp encoding
staticky -r dir // all files in the current directory will be monitored.Contributing
Any type of contribution is welcome, here are some examples of how you may contribute to this project:
- Submit issues to report bugs or ask questions.
- Propose pull requests to improve our code。