I am new to Golang and created a very simply application that says Hello World in a html page . I then try to get my GO code to amazon beanstalk by copying the project and making it a zip file and then uploading it to beanstalk but I always get this error
Unable to launch application as the source bundle does not contain a Buildfile, Procfile or an executable.
Does anyone know how to fix this or get around it… this is my code below and then a simple html page. Any suggestions would be great
package main
import (
“GitHub - gorilla/mux: Package gorilla/mux is a powerful HTTP router and URL matcher for building Go web servers with 🦍”
“net/http”
“time”
“log”
“os”
)func main() {
port := os.Getenv(“PORT”)
if port == “” {
port = “5000”
}r := mux.NewRouter()
r.PathPrefix(“/”).Handler(http.StripPrefix(“/”, http.FileServer(http.Dir(“Views/”))))
http.Handle(“/”, r)
srv := &http.Server{
ReadTimeout: 20 * time.Second,
WriteTimeout: 20 * time.Second,
IdleTimeout: 120 * time.Second,
Addr: “:5000”,
}
http.ListenAndServe(“:”+port,nil)
log.Println(srv.ListenAndServe())
}