Skip to content

Commit 8df543e

Browse files
authored
Update README.md
1 parent 7fa9603 commit 8df543e

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,20 @@ This is standalone, multithreaded, almost or No dependancy ! http server in Java
1010

1111

1212
```java
13-
//call contructor with local ip, port , public html directory path
14-
TinyWebServer.startServer("localhost",9000, "/web/public_html");
13+
@Override
14+
protected void onCreate(Bundle savd){
15+
super.onCreate(savd);
16+
...
17+
//call contructor with local ip, port , public html directory path
18+
TinyWebServer.startServer("localhost",9000, "/web/public_html");
19+
}
20+
21+
@Override
22+
public void onDestroy(){
23+
super.onDestroy();
24+
//stop webserver on destroy of service or process
25+
TinyWebServer.stopServer();
26+
}
1527
```
1628

1729
## How to write custom api?

0 commit comments

Comments
 (0)