Skip to content

Commit 2f5b748

Browse files
committed
Public asset folder support
2 parents 5af0394 + 8ca7ef4 commit 2f5b748

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
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+
```

0 commit comments

Comments
 (0)