Skip to content

misraX/fastapi-shell-commands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

INSTALL

bash ./scripts/install.sh

RUN

bash ./scripts/start.sh

start.sh accepts an optional port number as a param, for example: bash ./scripts/start.sh 9000

If the port isn't provided, the default will be 8000

TEST

bash ./scripts/test.sh

API

URL: /command/
Method: POST
Body <JSON>: { "command": string }

EXAMPLE

Request:

curl -X 'POST' \
  'http:https://localhost:8000/command/' \
  -H 'accept: text/plain' \
  -H 'Content-Type: application/json' \
  -d '{
  "command": "date"
}'

Response:

Sat Nov 12 12:57:16 EET 2022

About

Run Shell Command Right From FastAPI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published