Skip to content
Sign UpLog In
Profile icon

brams

@badsport
im currently learning Python
Repls
Community
badsport
badsport
shared a Post
2 years ago
How can i ping my repl that is written in GO.
The title say it all. Thanks in advance
Coder100
Coder100
Hi! Seeing from past comments, here's a step-by-step tutorial of what is needed. Step 1: Server Super simple, add this to your code: // packages needed import ( "fmt" "net/http" ) func keep_alive() { // APPEND this to your code, do not replace it. http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "Welcome to new server!") }) http.ListenAndServe(":5050", nil) } // Now, in your main file: func main() { // ... your code ... keep_alive() } Ste2 years ago
CodingCactus
CodingCactus
so your repl in go is running a web server and you want to ping it? just ping the repl-name.badsport.repl.co link2 years ago
ironblockhd
ironblockhd
Use super duper simple pinger by @mat12 years ago