Skip to content
Snippets Groups Projects
Select Git revision
  • 9f0c981877daebbd41b6d189e58e99319e438d33
  • main default protected
  • andrnybe-main-patch-58069
3 results

reverse.ps1

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    main.go 587 B
    package main
    
    import (
    	"assignment1"
    	"fmt"
    	"log"
    	"net/http"
    	"os"
    )
    
    func main() {
    
    	port := os.Getenv("PORT")
    	if port == "" {
    		port = "8080"
    	}
    
    	http.HandleFunc("/", assignment1.HandlerNil)
    	http.HandleFunc("/conservation/v1/country/", assignment1.HandlerCountry)
    	http.HandleFunc("/conservation/v1/species/", assignment1.HandlerSpecies)
    	http.HandleFunc("/conservation/v1/diag/", assignment1.HandlerDiag)
    	//http.HandleFunc("/conservation/v1/species2/", assignment1.HandlerOnlySpecies)
    	fmt.Println("Listening on port " + port)
    	log.Fatal(http.ListenAndServe(":"+port, nil))
    
    }