Skip to content

Mdiyr/vending-machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vending-machine

vending machine

this app could run in two mod

1 - restAPI

 - run via docker:
    docker-compose up -d --build
    or go run main.go
    it will serve app on 8000 port
    using postman file located doc directory you can make request

2 - command line interface( cli )

Instead of using restAPI you can use command line interface for call app functions

Step 1

build app using below command

go build

Step 2 two

Print available machine list

./vending-machine machines

Buy a coca

./vending-machine coca MACHINE_NAME COIN(int)

Buy a coffee

./vending-machine coffee MACHINE_NAME COIN(int)

About

vending machine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published