Skip to content

Files are missing #8

@cleanfuzz

Description

@cleanfuzz

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions