diff --git a/README.md b/README.md index b6ded0a..0e7b2b8 100755 --- a/README.md +++ b/README.md @@ -146,11 +146,39 @@ TASK PROC: **Web Server** -1. **Spring Boot**, port 8080 +1. **Spring Boot API**, port 8080 2. **Java NIO**, port 8088 *Front-end: LayUI* +**1. Spring Boot API** + +> Front-end: LayUI + Vue.js +> API: Json + RestController +> Back-end: jMiniLang API Handler (RING 3 Process) + +![Screenshot 102](https://raw.githubusercontent.com/bajdcc/jMiniLang/master/screenshots/web-2.png) + +**Back-end** + +```javascript +import "user.base"; +import "user.web"; +var ctx = g_web_get_api(); +if (g_is_null(ctx)) { return; } +ctx["resp"] := [ + [ "唯一标识", g_env_get_guid() ], + [ "作者", g_author() ], + [ "当前版本", g_version() ], + [ "仓库地址", g_github_repo() ] +]; +g_web_set_api(ctx); +``` + +---- + +**2. Java NIO** + ![Screenshot 101](https://raw.githubusercontent.com/bajdcc/jMiniLang/master/screenshots/web-1.png) ```javascript diff --git a/jMiniLang.iml b/jMiniLang.iml index 8082ae8..e9a23cb 100644 --- a/jMiniLang.iml +++ b/jMiniLang.iml @@ -14,7 +14,54 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/screenshots/web-2.png b/screenshots/web-2.png new file mode 100644 index 0000000..76bc2cb Binary files /dev/null and b/screenshots/web-2.png differ diff --git a/src/main/resources/com/bajdcc/code/fs/api.txt b/src/main/resources/com/bajdcc/code/fs/api.txt index 1c11ba8..3b53070 100644 --- a/src/main/resources/com/bajdcc/code/fs/api.txt +++ b/src/main/resources/com/bajdcc/code/fs/api.txt @@ -3,6 +3,9 @@ import "user.web"; var ctx = g_web_get_api(); if (g_is_null(ctx)) { return; } ctx["resp"] := [ - [ "GUID", g_env_get_guid() ] + [ "唯一标识", g_env_get_guid() ], + [ "作者", g_author() ], + [ "当前版本", g_version() ], + [ "仓库地址", g_github_repo() ] ]; g_web_set_api(ctx); \ No newline at end of file diff --git a/src/main/resources/com/bajdcc/code/module/user/ModuleUserBase.txt b/src/main/resources/com/bajdcc/code/module/user/ModuleUserBase.txt index b9ebf37..97842ac 100644 --- a/src/main/resources/com/bajdcc/code/module/user/ModuleUserBase.txt +++ b/src/main/resources/com/bajdcc/code/module/user/ModuleUserBase.txt @@ -1,5 +1,7 @@ var g_author = func ["用户态模块的作者:bajdcc"] ~() -> "bajdcc"; export "g_author"; +var g_version = func ~() -> "v2.3.3"; +export "g_version"; var g_github_repo = func ~() -> "https://github.com/bajdcc/jMiniLang"; export "g_github_repo"; var g_println = func ~() {