Skip to content

Commit 523c605

Browse files
authored
Update README.md
1 parent 1d297fb commit 523c605

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

README.md

+17-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,23 @@ Usage of ./git-http-backend:
5353

5454
To embed your own server import and use the package
5555

56-
```
57-
import "github.com/asim/git-http-backend/server"
56+
```go
57+
package main
58+
59+
import (
60+
"log"
61+
"net/http"
62+
63+
github.com/asim/git-http-backend/server"
64+
)
65+
66+
func main() {
67+
http.HandleFunc("/", server.Handler())
68+
69+
if err := http.ListenAndServe(":8080", nil); err != nil {
70+
log.Fatal("ListenAndServe: ", err)
71+
}
72+
}
5873
```
5974
6075
## License

0 commit comments

Comments
 (0)