A SaaS RESTful API platform for a studio manager to create classes and gets bookings from clients
You will need Go version 1.14+ installed on your development machine. visit my article https://hashnode.com/post/the-proper-way-to-install-golang-and-set-up-your-workspace-ck8qhtjbu009oehs1nri77i5h to correctly download golang and setup your GOPATH~
-
Clone the application with
https://github.com/AlexSwiss/glofox_task.git
-
Download the postman configuration file (optional).
-
There are number of dependencies which need to be imported before running the application. Please get the dependenices through the following commands -
go get "github.com/julienschmidt/httprouter"
-
To run the application, please use the following command -
go build ./glofox_task
Note: By default the port number is running on 8080.
URL - *http://localhost:8080/api/classes*
Method - POST
Body - (content-type = application/json)
{
"name":"Workout 101",
"startdate":"01 July 2020",
"enddate":"01 August 2020",
"capacity":"10"
}
URL - *http://localhost:8080/api/classes_list*
Method - GET
URL - *http://localhost:8080/api/bookings*
Method - POST
Body - (content-type = application/json)
{
"name":"Alexander Swiss",
"date":"01 July 2020"
}
URL - *http://localhost:8080/api/bookings_list*
Method - GET
To run all the unit test cases, please do the following -
go build
./glofox_task
go test -v