Description

A simple HTTP server for static files.

Package Information

Version1.0.1 (2016-Jan-03)
Repositoryhttps://github.com/MartinNowak/serve
LicenseMIT
CopyrightCopyright © 2015-, Martin Nowak
AuthorsMartin Nowak
Registered byMartin Nowak
Dependencies

vibe-d

Installation

To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

Readme

serve Dub Uses vibe.d

A simple HTTP server for static files.

Installation

You can simply use dub to run the tool.

dub fetch serve
dub run serve
dub run serve -- [ARGS]

Or you build the tool and copy/symlink it into your path.

dub fetch serve
dub build serve
sudo mv ~/.dub/packages/serve-1.0.0/serve /usr/local/bin/

Usage

  • serve the current working directory

    serve
    
  • serve an html file with it's containing folder and open it in your browser

    serve path/to/index.html
    
  • serve a folder

    serve path/to/folder
    
  • use a different port that 8080 (-p|--port)

    serve -p 1234
    
  • bind a different IP address than 127.0.0.1 using (-b|--bind)

    serve -b 127.0.0.1
    
  • run -h|--help to see all options

    serve -h
    

Available versions

1.0.1 1.0.0 ~master