Skip to content

Commit

Permalink
docs(gateway): link to specs
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel authored Jan 30, 2023
1 parent eaea27b commit 4436ebf
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions gateway/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# IPFS Gateway

> IPFS Gateway HTTP handler.
> A reference implementation of HTTP Gateway Specifications.
## Documentation

* Go Documentation: https://pkg.go.dev/github.com/ipfs/go-libipfs/gateway

* Gateway Specification: https://github.com/ipfs/specs/tree/main/http-gateways#readme
* Types of HTTP Gateways: https://docs.ipfs.tech/how-to/address-ipfs-on-web/#http-gateways
## Example

```go
Expand All @@ -23,13 +24,13 @@ conf := gateway.Config{
ipfs := ...
offlineIPFS := ...

// Create http mux and setup gateway handler.
// Create http mux and setup path gateway handler.
mux := http.NewServeMux()
gwHandler := gateway.NewHandler(conf, ipfs, offlineIPFS)
mux.Handle("/ipfs/", gwHandler)
mux.Handle("/ipns/", gwHandler)

// Start the server on :8080 and voilá! You have an IPFS gateway running
// Start the server on :8080 and voilá! You have a basic IPFS gateway running
// in http://localhost:8080.
_ = http.ListenAndServe(":8080", mux)
```

0 comments on commit 4436ebf

Please sign in to comment.