An Application Programming Interface to Create, Read, Update and Delete on a File System.
To serve on localhost, run the main file of this repo.
go run main.go
go run main.go -port=:1234 -store=./store
Port to serve the API on. (Default: :1234
)
Path to the file storage directory. (Default: ./store
)
curl --request POST 'localhost:1234/test.txt' --data-raw 'Booyaka'
curl --request GET 'localhost:1234/test.txt'
curl --request PUT 'localhost:1234/test.txt' --data-raw 'Boomshakalakasha'
curl --request DELETE 'localhost:1234/test.txt'
To run the unit tests.
go test -cover -v