Skip to content

Latest commit

 

History

History
36 lines (32 loc) · 929 Bytes

README.md

File metadata and controls

36 lines (32 loc) · 929 Bytes

groovy-simplehttpserver

SimpleHTTPServer for Groovy, inspired by Python's SimpleHTTPServer

Usage

Launch a SimpleHttpServer instance

groovy SimpleHttpServer <port> <base dir|zip file> <context root>

Visit the following URL to access files

 http://localhost:<port>/<context root>/<relative path>

For example

  1. listen on port 8000 and serve files under current directory
groovy SimpleHttpServer
  1. listen on port 8080 and serve files under current directory
groovy SimpleHttpServer 8080
  1. listen on port 8080 and serve files under the directory D:\temp
groovy SimpleHttpServer 8080 D:\temp
  1. listen on port 8080 and serve files under the directory D:\temp, in addition its context root is gshs
groovy SimpleHttpServer 8080 D:\temp gshs
  1. listen on port 8080 and serve files in the zip file D:\temp\apidoc.zip
groovy SimpleHttpServer 8080 D:\temp\apidoc.zip