1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+
4
+ < head >
5
+ <!-- Required meta tags -->
6
+ < meta charset ="utf-8 ">
7
+ < meta name ="viewport " content ="width=device-width, initial-scale=1, shrink-to-fit=no ">
8
+
9
+ < link rel ="
stylesheet "
href ="
https://cdn.jsdelivr.net/npm/[email protected] /dist/css/bootstrap.min.css "
10
+ integrity ="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T " crossorigin ="anonymous ">
11
+
12
+ < link rel ="icon " href ="./favicon.ico " type ="image/x-icon ">
13
+ < title > Android Embedded Server</ title >
14
+ </ head >
15
+
16
+ < body style ="padding: 96px 0px 96px 0px; ">
17
+
18
+ < h1 align ="center "> Android Embedded Server </ h1 >
19
+
20
+ < div align ="center ">
21
+ < img src ="https://img.shields.io/badge/kotlin-v1.9.23-blue.svg ">
22
+ < img src ="https://img.shields.io/badge/gradle-8.3.2-blueviolet.svg ">
23
+ < img src ="https://img.shields.io/badge/API-21%2B-blue.svg?style=flat ">
24
+ < img src ="https://img.shields.io/badge/License-Apache%202.0-success.svg ">
25
+ < img src ="https://circleci.com/gh/twilio-labs/plugin-rtc.svg?style=svg ">
26
+ < a href ="https://github.com/nphau/android.embeddedserver/actions/workflows/app-build.yml "> < img
27
+ alt ="Build Status "
28
+ src ="https://github.com/nphau/android.embeddedserver/actions/workflows/app-build.yml/badge.svg " /> </ a >
29
+ </ div >
30
+
31
+ < p >
32
+ < img src ="https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png " style ="width: 100%; "
33
+ alt ="----------------------------------------------------- ">
34
+ </ p >
35
+
36
+ < div style ="padding: 0px 16px 0px 16px; ">
37
+
38
+ < h2 id ="-overview "> 👉 Overview</ h2 >
39
+ < p > A minimal way to create HTTP server in android with Kotlin. Create asynchronous client and server
40
+ applications.
41
+ Anything from microservices to multiplatform HTTP client apps in a simple way. Open Source, free, and fun!
42
+ </ p >
43
+ < pre > < code class ="lang-kotlin "> < span class ="hljs-function "> < span class ="hljs-title "> embeddedServer</ span > < span class ="hljs-params "> (Netty, PORT, watchPaths = emptyList()</ span > </ span > ) {
44
+ install(WebSockets)
45
+ install(CallLogging)
46
+ routing {
47
+ get(< span class ="hljs-string "> "/"</ span > ) {
48
+ call.respondText(
49
+ text = < span class ="hljs-string "> "Hello!! You are here in ${Build.MODEL}"</ span > ,
50
+ contentType = ContentType< span class ="hljs-selector-class "> .Text</ span > < span class ="hljs-selector-class "> .Plain</ span >
51
+ )
52
+ }
53
+ }
54
+ }
55
+ </ code > </ pre >
56
+ < h2 id ="-how-to-use "> 🚀 How to use</ h2 >
57
+ < p > Cloning the repository into a local directory and checkout the desired branch:</ p >
58
+ < pre > < code > git clone git@github< span class ="hljs-selector-class "> .com</ span > :nphausg/android< span class ="hljs-selector-class "> .embeddedserver</ span > < span class ="hljs-selector-class "> .git</ span >
59
+ cd android< span class ="hljs-selector-class "> .embeddedserver</ span >
60
+ git checkout master
61
+ </ code > </ pre >
62
+ < h2 id ="-contributing "> ✨ Contributing</ h2 >
63
+ < p > Please feel free to contact me or make a pull request.</ p >
64
+ < h2 id ="-author "> 👀 Author</ h2 >
65
+ < p >
66
+ < a href ="https://nphausg.medium.com " target ="_blank ">
67
+ < img src ="https://avatars2.githubusercontent.com/u/13111806?s=400&u=f09b6160dbbe2b7eeae0aeb0ab4efac0caad57d7&v=4 "
68
+ width ="96 " height ="96 ">
69
+ </ a >
70
+ < a href ="https://github.com/hieuwu " target ="_blank ">
71
+ < img src ="https://avatars.githubusercontent.com/u/43868345?v=4 " width ="96 " height ="96 ">
72
+ </ a >
73
+ </ p >
74
+ </ div >
75
+ < script src ="https://code.jquery.com/jquery-3.3.1.slim.min.js "
76
+ integrity ="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo "
77
+ crossorigin ="anonymous "> </ script >
78
+ < script src ="
https://cdn.jsdelivr.net/npm/[email protected] /dist/umd/popper.min.js "
79
+ integrity ="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1 "
80
+ crossorigin ="anonymous "> </ script >
81
+ < script src ="
https://cdn.jsdelivr.net/npm/[email protected] /dist/js/bootstrap.min.js "
82
+ integrity ="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM "
83
+ crossorigin ="anonymous "> </ script >
84
+ </ body >
85
+
86
+ </ html >
0 commit comments