| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
轻量级POC和工具开发脚手架,基于 CGI + Shell Script + JavaScript。
./run.sh服务器在 http://127.0.0.1:8080 启动。
cgi-bin/ # 后端 CGI 脚本 main.cgi # 路由入口 config.sh # 配置管理 utils.sh # 工具函数 modules/ # 业务模块 web/ # 前端资源 index.html # 入口页面 .env # 配置文件 run.sh # 启动脚本
#!/bin/bash
handle_request() {
local request_body="$1"
local operation=$(parse_json "$request_body" "operation")
case "$operation" in
"test") json_success "测试成功" ;;
*) json_error "未知操作" ;;
esac
}# JSON 处理
parse_json "$json" "key"
json_success "$message" "$data"
json_error "$message"
# 安全验证
validate_input "$input" $max_len
safe_path "$path"
# 日志记录
log_info "$message"
log_error "$message"api
.call("example", {
operation: "hello",
name: "world",
})
.then((result) => {
console.log("return response is: ", result);
});PORT=8080
HOST=127.0.0.1
DEBUG=true
APP_NAME="CGI Quick Start"| Back | FazBrowse Home | New Git URL |