Skip to content

xkcm/web-execute

Repository files navigation

web-execute

Web service built in NodeJS for executing shell commands on the server's system.

Installation

git clone github.com/xkcm/web-execute # clone this repo
cd web-execute
docker-compose up # use docker-compose to start the app

Docs

/execute endpoint

Send the POST request to the /execute URL with JSON object in the request's body:

{
  "command": "your command here"
}

Example

fetch("http://localhost:4000/execute", {
  method: "POST",
  data: JSON.stringify({
    command: "uname -a"
  })
})

Usage with frontend

There is also a simple frontend page available built in Vue. To run the app with frontend you have to switch to the frontend git branch and run docker again.

git switch frontend
docker-compose up --build # rebuild the containers if needed

About

Web service for executing shell commands.

Resources

Stars

Watchers

Forks