mirror of
https://github.com/labstack/echo.git
synced 2024-12-24 20:14:31 +02:00
Updated website
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
parent
3327f3453b
commit
1a124f8aab
29
README.md
29
README.md
@ -27,7 +27,7 @@ Echo is a fast HTTP router (zero memory allocation) and micro web framework in G
|
|||||||
- Serve static files, including index.
|
- Serve static files, including index.
|
||||||
- Centralized HTTP error handling.
|
- Centralized HTTP error handling.
|
||||||
- Use a customized function to bind request body to a Go type.
|
- Use a customized function to bind request body to a Go type.
|
||||||
- Register a view render so you can use any HTML templating engine.
|
- Register a view render so you can use any HTML template engine.
|
||||||
|
|
||||||
## Benchmark
|
## Benchmark
|
||||||
|
|
||||||
@ -67,10 +67,11 @@ BenchmarkZeus_GithubAll 2000 752907 ns/op 300688 B/op 2648 all
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
- [Go](https://golang.org/doc/install) > 1.4.x
|
```sh
|
||||||
- `go get github.com/labstack/echo`
|
$ go get github.com/labstack/echo
|
||||||
|
```
|
||||||
|
|
||||||
##[Examples](https://github.com/labstack/echo/tree/master/examples)
|
##[Hello, World!](https://github.com/labstack/echo/tree/master/examples/hello)
|
||||||
|
|
||||||
> Hello, World!
|
> Hello, World!
|
||||||
|
|
||||||
@ -90,6 +91,7 @@ func hello(c *echo.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
// Echo instance
|
||||||
e := echo.New()
|
e := echo.New()
|
||||||
|
|
||||||
// Middleware
|
// Middleware
|
||||||
@ -102,6 +104,25 @@ func main() {
|
|||||||
e.Run(":4444")
|
e.Run(":4444")
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
##[Examples](https://github.com/labstack/echo/tree/master/examples)
|
||||||
|
|
||||||
|
##[Guide](http://labstack.github.io/echo)
|
||||||
|
|
||||||
|
## Contribute
|
||||||
|
|
||||||
|
**Use issues for everything**
|
||||||
|
|
||||||
|
- Report problems
|
||||||
|
- Discuss before sending pull request
|
||||||
|
- Suggest new features
|
||||||
|
- Improve/fix documentation
|
||||||
|
|
||||||
|
## Credits
|
||||||
|
- [Vishal Rana](https://github.com/vishr) - Author
|
||||||
|
- [Nitin Rana](https://github.com/nr17) - Consultant
|
||||||
|
- [Contributors](https://github.com/labstack/echo/graphs/contributors)
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
[MIT](https://github.com/labstack/echo/blob/master/LICENSE)
|
[MIT](https://github.com/labstack/echo/blob/master/LICENSE)
|
||||||
|
@ -25,9 +25,13 @@ $ go get -u github.com/labstack/echo
|
|||||||
Echo follows [Semantic Versioning](http://semver.org) managed through GitHub releases.
|
Echo follows [Semantic Versioning](http://semver.org) managed through GitHub releases.
|
||||||
Specific version of Echo can be installed using any [package manager](https://github.com/avelino/awesome-go#package-management).
|
Specific version of Echo can be installed using any [package manager](https://github.com/avelino/awesome-go#package-management).
|
||||||
|
|
||||||
### Configuration
|
## Configuration
|
||||||
|
|
||||||
#### MaxParam
|
echo.MaxParam
|
||||||
|
|
||||||
|
echo.NotFoundHandler
|
||||||
|
|
||||||
|
echo.HTTPErrorHandler
|
||||||
|
|
||||||
## Routing
|
## Routing
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ Echo is a fast HTTP router (zero memory allocation) and micro web framework in G
|
|||||||
- Serve static files, including index.
|
- Serve static files, including index.
|
||||||
- Centralized HTTP error handling.
|
- Centralized HTTP error handling.
|
||||||
- Use a customized function to bind request body to a Go type.
|
- Use a customized function to bind request body to a Go type.
|
||||||
- Register a view render so you can use any HTML templating engine.
|
- Register a view render so you can use any HTML template engine.
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
@ -89,7 +89,7 @@ producing output
|
|||||||
```
|
```
|
||||||
|
|
||||||
`e.Get("/", hello)` Registers a GET route for path `/` with hello handler, so
|
`e.Get("/", hello)` Registers a GET route for path `/` with hello handler, so
|
||||||
whenever server receives a request at `/` hello handler is called.
|
whenever server receives a request at `/`, hello handler is called.
|
||||||
|
|
||||||
In hello handler `c.String(http.StatusOK, "Hello, World!\n")` sends a text/plain
|
In hello handler `c.String(http.StatusOK, "Hello, World!\n")` sends a text/plain
|
||||||
response to the client with 200 status code.
|
response to the client with 200 status code.
|
||||||
@ -105,6 +105,10 @@ $ go run server.go
|
|||||||
Browse to [http://localhost:4444](http://localhost:4444) and you should see
|
Browse to [http://localhost:4444](http://localhost:4444) and you should see
|
||||||
Hello, World! on the page.
|
Hello, World! on the page.
|
||||||
|
|
||||||
|
### Next?
|
||||||
|
- Browse [examples](https://github.com/labstack/echo/tree/master/examples)
|
||||||
|
- Head over to [Guide](guide.md)
|
||||||
|
|
||||||
## Contribute
|
## Contribute
|
||||||
|
|
||||||
**Use issues for everything**
|
**Use issues for everything**
|
||||||
@ -114,6 +118,11 @@ Hello, World! on the page.
|
|||||||
- Suggest new features
|
- Suggest new features
|
||||||
- Improve/fix documentation
|
- Improve/fix documentation
|
||||||
|
|
||||||
|
## Credits
|
||||||
|
- [Vishal Rana](https://github.com/vishr) - Author
|
||||||
|
- [Nitin Rana](https://github.com/nr17) - Consultant
|
||||||
|
- [Contributors](https://github.com/labstack/echo/graphs/contributors)
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
[MIT](https://github.com/labstack/echo/blob/master/LICENSE)
|
[MIT](https://github.com/labstack/echo/blob/master/LICENSE)
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
var gulp = require('gulp');
|
var gulp = require('gulp');
|
||||||
|
var shell = require('gulp-shell');
|
||||||
var ghPages = require('gulp-gh-pages');
|
var ghPages = require('gulp-gh-pages');
|
||||||
|
|
||||||
gulp.task('deploy', function() {
|
gulp.task('build', shell.task('mkdocs build --clean'))
|
||||||
|
|
||||||
|
gulp.task('deploy',['build'], function() {
|
||||||
return gulp.src('./site/**/*')
|
return gulp.src('./site/**/*')
|
||||||
.pipe(ghPages());
|
.pipe(ghPages());
|
||||||
});
|
});
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"gulp": "^3.8.11",
|
"gulp": "^3.8.11",
|
||||||
"gulp-gh-pages": "^0.5.1"
|
"gulp-gh-pages": "^0.5.1",
|
||||||
|
"gulp-shell": "^0.4.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user