Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 80312200BDC for ; Wed, 14 Dec 2016 23:37:10 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 7ED82160B19; Wed, 14 Dec 2016 22:37:10 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7DCEC160B0D for ; Wed, 14 Dec 2016 23:37:09 +0100 (CET) Received: (qmail 99763 invoked by uid 500); 14 Dec 2016 22:37:08 -0000 Mailing-List: contact dev-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@groovy.apache.org Delivered-To: mailing list dev@groovy.apache.org Received: (qmail 99753 invoked by uid 99); 14 Dec 2016 22:37:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Dec 2016 22:37:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 03DB2D168F for ; Wed, 14 Dec 2016 22:37:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.312 X-Spam-Level: **** X-Spam-Status: No, score=4.312 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, URI_HEX=1.313] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id fzeV6xgpiOUt for ; Wed, 14 Dec 2016 22:37:05 +0000 (UTC) Received: from homiemail-a81.g.dreamhost.com (sub5.mail.dreamhost.com [208.113.200.129]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id BE25F60E3B for ; Wed, 14 Dec 2016 22:37:04 +0000 (UTC) Received: from homiemail-a81.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a81.g.dreamhost.com (Postfix) with ESMTP id D833E4F1D; Wed, 14 Dec 2016 14:36:41 -0800 (PST) Received: from new-host-2.home (pool-173-62-64-171.pghkny.fios.verizon.net [173.62.64.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: keith@suderman.com) by homiemail-a81.g.dreamhost.com (Postfix) with ESMTPSA id 6129F4F1A; Wed, 14 Dec 2016 14:36:41 -0800 (PST) From: Suderman Keith Message-Id: <9FA01F54-C145-4AAF-A10F-215569712375@anc.org> Content-Type: multipart/alternative; boundary="Apple-Mail=_BE013097-A7E3-4236-8015-9FA977B471DA" Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: SimpleHTTPServer for Groovy 3( Maybe Groovy 2.5.0? ) Date: Wed, 14 Dec 2016 17:36:40 -0500 In-Reply-To: Cc: dev@groovy.incubator.apache.org To: dev@groovy.apache.org References: <1481718593894-5737235.post@n5.nabble.com> X-Mailer: Apple Mail (2.3251) archived-at: Wed, 14 Dec 2016 22:37:10 -0000 --Apple-Mail=_BE013097-A7E3-4236-8015-9FA977B471DA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii -1 as well. While it is a cool feature, I have to agree that it feels more like a = lib than something that belongs in the language itself. =20 > On Dec 14, 2016, at 7:55 AM, Daniel Sun = wrote: >=20 >> groovy -m com.sparkjava:spark-groovy -c "serve(port: 8080, path: > 'd:\\temp')" > How many characters will we type... to be frank, I am not that patient = to > type such a long command. That is what shell scripts are for, it is not a reason to include = something in the core language. Cheers, Keith > On Dec 14, 2016, at 12:46 PM, Marcin Erdmann = wrote: >=20 > -1 from me as well, fells more like a lib feature than a language = feature. I agree with other folks that it is bloating the language for = quite a narrow usecase. >=20 >=20 > On Wed, 14 Dec 2016 at 12:39, Sergei Egorov > wrote: > Hi Daniel, >=20 > To be honest, I don't like it, -1 from me. >=20 > 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. >=20 > I would rather see something like: >=20 > groovy -m com.sparkjava:spark-groovy -c "serve(port: 8080, path: = 'd:\\temp')" >=20 > On Wed, Dec 14, 2016 at 2:29 PM Daniel Sun > wrote: > Hi all, >=20 >=20 >=20 >=20 >=20 > SimpleHTTPServer has been implemented(http://bit.ly/2hsKm0V = ), it >=20 >=20 > supports serving files not only under directory but also in the zip = file. >=20 >=20 > Here is the usage: "-lh listen on a port and >=20 >=20 > provide http service", e.g. >=20 >=20 > *serve files under current directory*: groovy -lh 8000 >=20 >=20 > *serve files under a specified directory*: groovy -lh 8000 d:\temp >=20 >=20 > *serve files in a zip file(we can view javadoc and groovydoc in the = zip >=20 >=20 > files inspried by GroovyHelp)*: groovy -lh 8000 d:\apidoc.zip >=20 >=20 >=20 >=20 >=20 > In addition, we can change the context root(/helloworld, = default >=20 >=20 > context root is /) via passing complete arguments: groovy -lh 8000 = d:\temp >=20 >=20 > helloworld, its usage is: groovy -lh >=20 >=20 > [context root] >=20 >=20 >=20 >=20 >=20 > After the SimpleHTTPServer launched, we can access files via >=20 >=20 > visiting http://localhost = ://=20 >=20 > the base directory> >=20 >=20 >=20 >=20 >=20 > Any thoughts? >=20 >=20 >=20 >=20 >=20 > Cheers, >=20 >=20 > Daniel.Sun >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 > -- >=20 >=20 > View this message in context: = http://groovy.329449.n5.nabble.com/SimpleHTTPServer-for-Groovy-3-Maybe-Gro= ovy-2-5-0-tp5737235.html = >=20 >=20 > Sent from the Groovy Dev mailing list archive at Nabble.com. >=20 >=20 >=20 >=20 --Apple-Mail=_BE013097-A7E3-4236-8015-9FA977B471DA Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii -1 as well.

While it is a cool feature, I have to agree that it feels = more like a lib than something that belongs in the language itself. =  

On Dec = 14, 2016, at 7:55 AM, Daniel Sun <realbluesun@hotmail.com> wrote:

groovy -m com.sparkjava:spark-groovy -c = "serve(port: 8080, path:
'd:\\temp')"
How many characters will we type... to be frank, I am not = that patient to
type such a long = command.

That is = what shell scripts are for, it is not a reason to include something in = the core language.

Cheers,
Keith

On = Dec 14, 2016, at 12:46 PM, Marcin Erdmann <marcin.erdmann@proxerd.pl> wrote:

-1 = from me as well, fells more like a lib feature than a language feature. = I agree with other folks that it is bloating the language for quite a = narrow usecase.


On = Wed, 14 Dec 2016 at 12:39, Sergei Egorov <bsideup@gmail.com> = wrote:
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 <realbluesun@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.





= --Apple-Mail=_BE013097-A7E3-4236-8015-9FA977B471DA--