From 564e2ba31471a7b139e0688a7ca92541d48c31e7 Mon Sep 17 00:00:00 2001 From: David Dias Date: Sat, 19 Aug 2017 17:57:51 +0200 Subject: [PATCH] docs(examples): reorganize examples and tutorials, add an index --- TODO | 2 +- examples/README.md | 12 ++++++++++++ .../001-the-host => examples/libp2p-host}/README.md | 1 + .../001-the-host => examples/libp2p-host}/host.go | 0 .../README.md | 0 .../main.go | 0 6 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 examples/README.md rename {tutorial/001-the-host => examples/libp2p-host}/README.md (99%) rename {tutorial/001-the-host => examples/libp2p-host}/host.go (100%) rename examples/{multicodecs => protocol-multiplexing-with-multicodecs}/README.md (100%) rename examples/{multicodecs => protocol-multiplexing-with-multicodecs}/main.go (100%) diff --git a/TODO b/TODO index af3a38c..49cea2f 100644 --- a/TODO +++ b/TODO @@ -1 +1 @@ -- pull mdns out as its own separate package +- [ ] pull mdns out as its own separate package diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..6a1a8ef --- /dev/null +++ b/examples/README.md @@ -0,0 +1,12 @@ +# `go-libp2p` examples and tutorials + +In this folder, you can find a variety of examples to help you get started in using go-libp2p. Every example as a specific purpose and some of each incorporate a full tutorial that you can follow through, helping you expand your knowledge about libp2p and p2p networks in general. + +Let us know if you find any issue or if you want to contribute and add a new tutorial, feel welcome to submit a pr, thank you! + +## Examples and Tutorials + +- [The libp2p 'host'](./libp2p-host) +- [Building an http proxy with libp2p](./http-proxy) +- [Protocol Multiplexing with multicodecs](./protocol-multiplexing-with-multicodecs) +- [An echo host](./echo) diff --git a/tutorial/001-the-host/README.md b/examples/libp2p-host/README.md similarity index 99% rename from tutorial/001-the-host/README.md rename to examples/libp2p-host/README.md index 66b91be..1503a1d 100644 --- a/tutorial/001-the-host/README.md +++ b/examples/libp2p-host/README.md @@ -1,4 +1,5 @@ # The libp2p 'host' + For most applications, the host is the basic building block you'll need to get started. This guide will show how to construct and use a simple host. The host is an abstraction that manages services on top of a swarm. It provides diff --git a/tutorial/001-the-host/host.go b/examples/libp2p-host/host.go similarity index 100% rename from tutorial/001-the-host/host.go rename to examples/libp2p-host/host.go diff --git a/examples/multicodecs/README.md b/examples/protocol-multiplexing-with-multicodecs/README.md similarity index 100% rename from examples/multicodecs/README.md rename to examples/protocol-multiplexing-with-multicodecs/README.md diff --git a/examples/multicodecs/main.go b/examples/protocol-multiplexing-with-multicodecs/main.go similarity index 100% rename from examples/multicodecs/main.go rename to examples/protocol-multiplexing-with-multicodecs/main.go -- GitLab