Skip to content

vineet-garg/assignment-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

assignment-1

Setup:

  1. Create a directory
mkdir -p $HOME/go/src/github.com/vineet-garg
cd $HOME/go/src/github.com/vineet-garg 
  1. Clone the repo
git clone https://github.com/vineet-garg/assignment-1.git
  1. step into the directory
cd assignment-1
  1. build
go build
  1. start the server
./assignment-1
  1. sample APIs:
    curl -X POST http://localhost:8080/hash -d "password=angryMonkey"
    
    1
    
    curl -XGET http://localhost:8080/hash/1
    
    ZEHhWB65gUlzdVwtDQArEyx+KVLzp/aTaRaPlBzYRIFj6vjFdqEb0Q5B8zVKCZ0vKbZPZklJz0Fd7su2A+gf7Q==
    
    curl -X GET http://localhost:8080/stats
    
    {"average":19,"total":1}
    
    curl -X POST http://localhost:8080/shutdown
    
  2. stop the server using HTTPS request as above or ~c

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages