WEBrick嵌入式HTTP服务器程序库
WEBrick是Ruby中内嵌的HTTP服务器程序库
下面是一个调用 WEBrick 实现最简单的 HTTP 服务器的代码:
#!/usr/local/bin/ruby
require 'webrick'
include WEBrick
s = HTTPServer.new(
:Port => 2000,
:DocumentRoot => Dir::pwd + "/htdocs"
)
## mount subdirectories
s.mount("/ipr", HTTPServlet::FileHandler, "/proj/ipr/public_html")
s.mount("/~gotoyuzo",
HTTPServlet::FileHandler, "/home/gotoyuzo/public_html",
true) #<= allow to show directory index.
trap("INT"){ s.shutdown }
s.start
评论
miniServer嵌入式 HTTP 服务器
miniServer是一个可内嵌进java应用的httpserver是一个基于annotation的极简mvc开发框架文档地址:http://git.oschina.net/dajiangnan/mi
miniServer嵌入式 HTTP 服务器
0
NanoHTTPD嵌入式HTTP服务器
NanoHTTPD是一个免费、轻量级的(只有一个Java文件)HTTP服务器,可以很好地嵌入到Java程序中。支持GET,POST,PUT,HEAD和DELETE请求,支持文件上传,占用内存很小。可轻
NanoHTTPD嵌入式HTTP服务器
0
JLHTTP嵌入式 Java HTTP 服务器
JLHTTP,全称为JavaLightweightHTTPServer,是一个HTTP服务器的开源实现。它小巧而又高效,只有几十K大小,但在轻量级的同时又提供了各种HTTP服务器中常见的有用功能。它既
JLHTTP嵌入式 Java HTTP 服务器
0
httpkit精巧的 java 嵌入式 http 服务器
httpkit是精巧的java嵌入式http服务器,超快的启动速度(实测仅需80毫秒),是tomcat、jetty的完美替代方案。使用方法//起一个server实例int port = 7777;Ht
httpkit精巧的 java 嵌入式 http 服务器
0