-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
I can't find the files asset-manifest.json, service-worker.js mentioned in main.go.
// static files
staticFiles := []string{
"favicon.ico",
"manifest.json",
"asset-manifest.json",
"robots.txt",
"service-worker.js",
"logo192.png",
"logo512.png",
"index.html",
}Also no */static directory (in main.go), I had to create it manually by copying existing files.
But I'm not sure I get files that you ment in */static directory.
for _, staticFile := range staticFiles {
f := fmt.Sprintf("/%s", staticFile)
http.Handle(f, serveStatic("/home/jheuel/services/pollrBot/static/"+f))
}
http.Handle("/", serveStatic("/home/jheuel/services/pollrBot/static/index.html"))
http.HandleFunc("/poll/", pollHandler(st))
http.Handle("/messageme/", contactHandler(bot))
fs := http.FileServer(http.Dir("/home/jheuel/services/pollrBot/static/static"))
http.Handle("/static/", http.StripPrefix("/static/", fs))The function below returns an error:
info, err := bot.GetWebhookInfo()
if err != nil {
log.Fatal(err)
}
if info.LastErrorDate != 0 {
log.Printf("Telegram callback failed: %s", info.LastErrorMessage)
}Error:
Telegram callback failed: Connection refused
I guess I'm getting an error due to missing and/or incorrect files.
The port specified for the Telegram webhook is forwarded.
Metadata
Metadata
Assignees
Labels
No labels