-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
28 lines (21 loc) · 749 Bytes
/
main.go
File metadata and controls
28 lines (21 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package main
import (
"fmt"
"net/http"
handlers "phxlabs/m/comp2005/automated_testing/src/handlers"
"time"
)
var pr = fmt.Println
func main() {
pr("Welcome ::: Report Automated Software Testing ... ")
pr("Server Starting ... ")
http.HandleFunc("/", greet)
http.HandleFunc("/employee/patients/", handlers.EmployeePatients)
http.HandleFunc("/patients/admissions/duration/3", handlers.PatientsAdmissionDuration)
http.HandleFunc("/patients/admissions/maxday/", handlers.WeekDayOfMaximumAdmissions)
http.HandleFunc("/employee/patients/average/duration/", handlers.EmployeePatientsDurationAverage)
http.ListenAndServe(":8080", nil)
}
func greet(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello World! %s", time.Now())
}