Skip to content

Enrico724/internal-proxy-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

internal-proxy-go

A tool which will let you redirect all traffic of your webserver to the service.

usage

Import all needed modules

import (
    "fmt"
    "github.com/Enrico724/internal-proxy-go"
    "net/http"
)

Create your handlers

func helloWorld(w http.ResponseWriter, _ *http.Request)  {
    _, _ = w.Write([]byte("Hello World!"))
}

Write the main

func main() {
    http.HandleFunc("/", helloWorld)
    err := internal_proxy.Serve()
    if err != nil {
        fmt.Printf("%v\n",err)
    }
}

And run your code

go run example/main.go

You can find this example inside example directory

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages