File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change 11# JServe
2- A lightweight, simple-to-use HTTP Web Server built with Java, and performance in mind .
2+ A lightweight, simple-to-use HTTP Web Server built with Java.
33<img src =" https://i.ibb.co/3RKzGsw/Adobe-Stock-389747989.jpg " />
4+
5+ # Quick setup
6+ You can install the jar (from the releases page) or install it from maven/gradle.
7+ More information will be available soon on this process.
8+
9+ # Examples
10+ ## Simple Server
11+ ``` java
12+ import com.devsegal.jserve.BaseHTTPServer ;
13+ import com.devsegal.jserve.ResponseHeaders ;
14+
15+ // ... your other code
16+ BaseHTTPServer server = new BaseHTTPServer (8080 ); // port
17+
18+ server. route(" /" , " GET" , (request, response) - > {
19+ response. setResponseHeaders(new ResponseHeaders (" text/html" , " close" ));
20+ response. insertContent(" Hello world!" );
21+ response. send();
22+ });
23+
24+ server. run();
25+ ```
You can’t perform that action at this time.
0 commit comments