资 源 简 介
Written in Scala, miniweb is a wrapper over an in-memory jetty instance. Useful for testing or for firing up a lightweight http endpoint in an application.
Getting Started
The easiest way is to grab the latest zip bundle, which includes bittyweb and all its dependencies in a single JAR. Stick that on your classpath.
This simple example constructs and starts a server, setting up some HTML to return for any URL:
val webServer = new HttpServer(9001)webServer.run()webServer.updateHtml(
Hello World!
)...webServer.stop()
Dependencies
bittyweb is written in scala, therefore it depends on the Scala libraries (currently 2.7.4). It also uses Jetty internally.