diff --git a/README.md b/README.md
index 2e2840ed..825aff83 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,6 @@
# [Echo](http://echo.labstack.com) [](http://godoc.org/github.com/labstack/echo) [](https://travis-ci.org/labstack/echo) [](https://coveralls.io/r/labstack/echo) [](https://gitter.im/labstack/echo)
-Echo is a fast HTTP router (zero dynamic memory allocation) and micro web framework in Go.
+
+Echo, a fast and unfancy micro web framework for Golang.
## Features
@@ -75,13 +76,13 @@ BenchmarkZeus_GithubAll 2000 748827 ns/op 30068
$ go get github.com/labstack/echo
```
-##[Examples](https://github.com/labstack/echo/tree/master/examples)
+## [Recipes](https://github.com/labstack/echo/tree/master/recipes)
-- [Hello, World!](https://github.com/labstack/echo/tree/master/examples/hello)
-- [CRUD](https://github.com/labstack/echo/tree/master/examples/crud)
-- [Website](https://github.com/labstack/echo/tree/master/examples/website)
-- [Middleware](https://github.com/labstack/echo/tree/master/examples/middleware)
-- [Stream](https://github.com/labstack/echo/tree/master/examples/stream)
+- [File Upload](http://echo.labstack.com/recipes/file-upload)
+- [Streaming File Upload](http://echo.labstack.com/recipes/streaming-file-upload)
+- [Streaming Response](http://echo.labstack.com/recipes/streaming-response)
+- [WebSocket](http://echo.labstack.com/recipes/websocket)
+- [Graceful Shutdown](http://echo.labstack.com/recipes/graceful-shutdown)
##[Guide](http://echo.labstack.com/guide)
diff --git a/recipes/file-upload/public/index.html b/recipes/file-upload/public/index.html
index eb56c800..82f38b49 100644
--- a/recipes/file-upload/public/index.html
+++ b/recipes/file-upload/public/index.html
@@ -2,11 +2,11 @@
- Multipart File Upload
+ File Upload
Upload Files
-
+
+
diff --git a/recipes/streaming-file-upload/server.go b/recipes/streaming-file-upload/server.go
index 5e12ffad..9966541b 100644
--- a/recipes/streaming-file-upload/server.go
+++ b/recipes/streaming-file-upload/server.go
@@ -39,8 +39,6 @@ func upload(c *echo.Context) error {
}
email := string(b)
- println(name, email)
-
// Read files
i := 0
for {
@@ -71,7 +69,7 @@ func upload(c *echo.Context) error {
func main() {
e := echo.New()
e.SetDebug(true)
- e.Index("../file-upload/public/index.html")
+ e.Index("public/index.html")
e.Post("/upload", upload)
e.Run(":1323")
}
diff --git a/recipes/streaming-response/server.go b/recipes/streaming-response/server.go
index 3d88e37f..0dbb1808 100644
--- a/recipes/streaming-response/server.go
+++ b/recipes/streaming-response/server.go
@@ -29,7 +29,7 @@ var (
func main() {
e := echo.New()
- e.Get("/stream", func(c *echo.Context) error {
+ e.Get("/", func(c *echo.Context) error {
c.Response().Header().Set(echo.ContentType, echo.ApplicationJSON)
c.Response().WriteHeader(http.StatusOK)
for _, l := range locations {
diff --git a/website/docs/index.md b/website/docs/index.md
index 1f2f633a..2615eeab 100644
--- a/website/docs/index.md
+++ b/website/docs/index.md
@@ -1,13 +1,9 @@
# Echo
-Build simple and performant systems!
+A fast and light web framework for Golang.
---
-## Overview
-
-Echo is a fast HTTP router (zero dynamic memory allocation) and micro web framework in Go.
-
## Features
- Fast HTTP router which smartly prioritize routes.
@@ -110,7 +106,7 @@ Browse to [http://localhost:1323](http://localhost:1323) and you should see
Hello, World! on the page.
### Next?
-- Browse [examples](https://github.com/labstack/echo/tree/master/examples)
+- Browse [recipes](https://github.com/labstack/echo/tree/master/recipes)
- Head over to [Guide](guide.md)
## Contribute
diff --git a/website/docs/recipes/file-upload.md b/website/docs/recipes/file-upload.md
index 39b146e3..762c310c 100644
--- a/website/docs/recipes/file-upload.md
+++ b/website/docs/recipes/file-upload.md
@@ -1,4 +1,10 @@
-## Multipart File Upload
+## File Upload
+
+- Multipart/form-data file upload
+- Multiple form fields and files
+
+Use `req.ParseMultipartForm(16 << 20)` for manually parsing multipart form. It gives
+us option to specify maximum memory used while parsing the request body.
`server.go`
@@ -64,11 +70,11 @@ func main() {
- Multipart File Upload
+ File Upload
Upload Files
-
+
+
+
+```
+
+## [Source Code](https://github.com/labstack/echo/blob/master/recipes/streaming-file-upload)
+
diff --git a/website/docs/recipes/streaming-response.md b/website/docs/recipes/streaming-response.md
index fbc714ab..8ce12d02 100644
--- a/website/docs/recipes/streaming-response.md
+++ b/website/docs/recipes/streaming-response.md
@@ -1,5 +1,8 @@
## Streaming Response
+- Send data as it is produced
+- Streaming JSON response with chunked transfer encoding
+
`server.go`
```go
@@ -34,7 +37,7 @@ var (
func main() {
e := echo.New()
- e.Get("/stream", func(c *echo.Context) error {
+ e.Get("/", func(c *echo.Context) error {
c.Response().Header().Set(echo.ContentType, echo.ApplicationJSON)
c.Response().WriteHeader(http.StatusOK)
for _, l := range locations {
@@ -50,4 +53,15 @@ func main() {
}
```
-## [Source Code]()
+`curl localhost:1323`
+
+```js
+{"Altitude":-97,"Latitude":37.819929,"Longitude":-122.478255}
+{"Altitude":1899,"Latitude":39.096849,"Longitude":-120.032351}
+{"Altitude":2619,"Latitude":37.865101,"Longitude":-119.538329}
+{"Altitude":42,"Latitude":33.812092,"Longitude":-117.918974}
+{"Altitude":15,"Latitude":37.77493,"Longitude":-122.419416}
+```
+
+## [Source Code](https://github.com/labstack/echo/blob/master/recipes/streaming-response)
+
diff --git a/website/docs/recipes/websocket.md b/website/docs/recipes/websocket.md
index b826fed4..c3250825 100644
--- a/website/docs/recipes/websocket.md
+++ b/website/docs/recipes/websocket.md
@@ -23,4 +23,5 @@ func main() {
}
```
-## [Source Code]()
+## [Source Code](https://github.com/labstack/echo/blob/master/recipes/websocket)
+
diff --git a/website/echo/base.html b/website/echo/base.html
index f005d8f6..75df7a29 100644
--- a/website/echo/base.html
+++ b/website/echo/base.html
@@ -10,7 +10,7 @@
{% if favicon %}
{% else %}{% endif %}
- {% if page_title %}{{ page_title }} - {% endif %}{{ site_name }}
+ {% if page_title %}{{ page_title }} - {% endif %}{{ config.extra.site_title }}
diff --git a/website/mkdocs.yml b/website/mkdocs.yml
index 05dee5d4..cd627c69 100644
--- a/website/mkdocs.yml
+++ b/website/mkdocs.yml
@@ -9,6 +9,9 @@ pages:
- Guide: guide.md
- Recipes:
- File Upload: recipes/file-upload.md
- - Graceful Shutdown: recipes/graceful-shutdown.md
+ - Streaming File Upload: recipes/streaming-file-upload.md
- Streaming Response: recipes/streaming-response.md
- WebSocket: recipes/websocket.md
+ - Graceful Shutdown: recipes/graceful-shutdown.md
+extra:
+ site_title: Echo, a fast and unfancy micro web framework for Golang.