miniserver
v1.0.3
Published
Mini http server, serving static files
Downloads
8
Maintainers
Readme
miniserver
Mini http server, serving static files.
A server for developers and by developers.
Installation
$ npm install miniserver -g
Quick Start
To serve current directory:
$ miniserver
To serve specific folder:
$ miniserver projects/dream
To run on production mode:
$ NODE_ENV=production miniserver projects/dream
Features
- Runs in cluster of processes to take advantage of multi-core systems
- Directory listing as html/json/text (
HTTP Accept
) via serve-index - Access logs via morgan
- cors support via cors
- basic authentication via basic-auth
- gzip compression via compression
- Customizable via command line options
- Development & Production modes via
NODE_ENV
environment variable -development
orproduction
Options
--port
Port to use. Default is 8080 ondevelopment
mode and 80 onproduction
mode--log
or--no-log
Enable or disable logging--logformat
morgan log format. Default isdev
ondevelopment
mode andcompact
onproduction
mode.--cors
or--no-cors
Enable or disable cors. Enabled indevelopment
mode--compress
or--no-compress
Enable or disable compression. Disabled indevelopment
mode