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

The Effective Engineer

The Effective Engineer

Edmond Lau / The Effective Bookshelf, Palo Alto, CA. / 2015-3-19 / USD 39.00

Introducing The Effective Engineer — the only book designed specifically for today's software engineers, based on extensive interviews with engineering leaders at top tech companies, and packed with h......一起来看看 《The Effective Engineer》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具