Skip to content

Latest commit

 

History

History
32 lines (28 loc) · 1.37 KB

README.md

File metadata and controls

32 lines (28 loc) · 1.37 KB

cli-client-server-calculator

a cli client-server app with cobra

overview

this project is a cli client-server app in which client gives a bunch of numbers with an operator to server
and server does some calculations according to the operator and sends the result to client

commands

in order to see complete guide to commands of this code you'd better run csp -h or csp --help:

Available Commands:  
  completion  generate the autocompletion script for the specified shell  
  enable      client-side starter command  
  help        Help about any command  
  server      runs server  
  
Flags:  
      --config string   config file (default is $HOME/.root.yaml)  
  -h, --help            help for root  
  -t, --toggle          Help message for toggle  

csp enable and csp server are our major commands here:


csp enable->
to use this command we recommend you to use this pattern csp enable FIRST_NUMBER SECOND_NUMBER ... nTH_NUMBER OPERATOR(+, -, *, /) like so:
picture alt
NOTE: be careful that you must turn server on at first to get result

csp server->
to turn your server on you must use this command(in another CLI window) as below:
picture alt

NOTE: this cli app has been tested inside jetbrains goland terminal