CLI 程序转 HTTP 服务 cmd2http

码农软件 · 软件分类 · 其他开发相关 · 2019-10-22 17:42:02

软件介绍

cmd2http 是将cli程序(系统命令、脚本等)转换为http服务的工具

cmd2http 是使用golang编写,跨平台 。

已经编译好的linux和windows包 :http://pan.baidu.com/s/1bnkyWLD#path=%252Fcmd2http

执行:

./cmd2http -conf=../example/cmd2http.json -port=8080

主页面: http://localhost:8080/  

hello world demo:  

          url : http://localhost:8080/echo?wd=hello&a=world
command exec : echo -n hello world defaultValue  
       config : echo -n $wd $a $b|defaultValue

配置示例:

{
   port:8310,
   title:"default title"
   intro:"intro info"
   timeout:30
   cache_dir:"./cache_data/"
   cmds:{
      pwd:{
          cmd:"pwd",
          intro:"cmd intor",
          timeout:10
       },
      echo:{
         cmd:"echo -n $wd|你好 $a $b"
         cache:120
        }
   }
}


本文地址:https://codercto.com/soft/d/17331.html

复杂网络理论及其应用

复杂网络理论及其应用

汪小帆、李翔、陈关荣 / 清华大学出版社 / 2006 / 45.00元

国内首部复杂网络专著 【图书目录】 第1章 引论 1.1 引言 1.2 复杂网络研究简史 1.3 基本概念 1.4 本书内容简介 参考文献 第2章 网络拓扑基本模型及其性质 2.1 引言 2.2 规则网络 2.3 随机图 2.4 小世界网络模型 2.5 无标度网络模型 ......一起来看看 《复杂网络理论及其应用》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具