cmd-exec-server

command module
v0.0.0-...-a1dd00e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2019 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

cmd-exec-server

It does...

cmd-exec-server executes the command specified by app-settings.json, with STDIN from HTTP request body, and returns STDOUT in HTTP response body.

It does not...

  • authenticate request
  • limit rate

future work

see GitHub project : https://github.com/hrkt/cmd-exec-server/projects

How to run

  1. edit app-settings.json

see: "app-settings.json" paragraph in this README.

  1. execute server.
$ make run
  1. make HTTP POST request
$ curl -X POST localhost:8080/api/exec -d "some input"
{"result":"SOME INPUT"}

prerequisites

  • dep as dependency manager
  • linux, *nix like platforms - ("endless" shows error message on windows platform, at this point of moment)

app-settings.json

specify "command" and "arguments"

{
    "command": "tr",
    "arguments": [
        "a-z",
        "A-Z"
    ]
}

usage

run in dev mode

$ make run

run in release mode

$ make release-run

build

$ make run

test

$ make test

format

$ make fmt

build container

$ make build-container

run container

$ make run-container

License

MIT

CI

CircleCI

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址