Hi Daniel, To be honest, I don't like it, -1 from me.
Why? Because we already put more and more stuff into the groovy itself, but, i.e. in a case of python, SimpleHTTPServer it's just a module after all. I would rather see something like: groovy -m com.sparkjava:spark-groovy -c "serve(port: 8080, path: 'd:\\temp')" On Wed, Dec 14, 2016 at 2:29 PM Daniel Sun <realblue...@hotmail.com> wrote: > Hi all, > > SimpleHTTPServer has been implemented(http://bit.ly/2hsKm0V), it > supports serving files not only under directory but also in the zip file. > Here is the usage: "-lh <httpServerPort> listen on a port and > provide http service", e.g. > *serve files under current directory*: groovy -lh 8000 > *serve files under a specified directory*: groovy -lh 8000 d:\temp > *serve files in a zip file(we can view javadoc and groovydoc in the zip > files inspried by GroovyHelp)*: groovy -lh 8000 d:\apidoc.zip > > In addition, we can change the context root(/helloworld, default > context root is /) via passing complete arguments: groovy -lh 8000 d:\temp > helloworld, its usage is: groovy -lh <httpServerPort> <base directory> > [context root] > > After the SimpleHTTPServer launched, we can access files via > visiting http://localhost:<httpServerPort>/<context root>/<path relative > to > the base directory> > > Any thoughts? > > Cheers, > Daniel.Sun > > > > -- > View this message in context: > http://groovy.329449.n5.nabble.com/SimpleHTTPServer-for-Groovy-3-Maybe-Groovy-2-5-0-tp5737235.html > Sent from the Groovy Dev mailing list archive at Nabble.com. >