Skip to content

HTTP development server for files spanning multiple directories

License

Notifications You must be signed in to change notification settings

Alexendoo/Serve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTTP server for development - serve several specified directories simulataniously

Install

go get github.com/Alexendoo/Serve

Or download a binary

Usage

USAGE:
   serve [OPTION]... [DIR]...

OPTIONS:
       --host     --  bind to host (default: localhost)
   -i, --index    --  serve all paths to index if file not found
       --no-list  --  disable directory listings
   -p, --port     --  bind to port (default: 8080)
   -v, --verbose  --  display requests and responses

Examples

Serve files from the current directory

serve

Utilise npm packages without having to type ../node_modules

serve client node_modules
client/
  index.html
node_modules/
  whatwg-fetch/
    fetch.js
<!-- in client/index.html -->
<script src="whatwg-fetch/fetch.js">

Use a specified file for any non matching requests, for instance for HTML5 routing

serve -i index.html