Web interface for a command-line program

前端 未结 3 2063
孤独总比滥情好
孤独总比滥情好 2021-01-23 21:05

I built a command-line program and I\'d like to build a web interface to let users around the world try the application easily.

I mean, the interface should have textfie

3条回答
  •  野性不改
    2021-01-23 21:42

    I would make a static HTML screen with a form which, when POSTed, invokes a CGI script in, say, Perl (or whichever language you are familiar with). The script would extract necessary parameters, "feed" them to your CLI program, capture its output via redirection or pipe (depending on the environment) and format the output as the HTML response.

提交回复
热议问题