Note
All development and improvements are moved to goroute.
Features
- Zero external runtime dependencies
- Smart HTTP Routing
- Data binding for JSON, XML and form payload
- Middlewares on global, group or single route level
- Full control of http server
Builtin middlewares
- Basic Auth
- Body Dump
- Body Limit
- Compress (GZip)
- CORS
- CSRF
- Key Auth
- Method Override
- Recover
- Request ID
- Rewrite
- Secure
- Slash
- Static
Getting Started
Prerequisites
You need to have at least go 1.11 installed on you local machine.
Installing
Install nio package with go get
go get -u github.com/go-nio/nio
Start your first awesome server. Create main.go file and add:
package main
import (
"net/http"
"log"
"github.com/go-nio/nio"
)
func main() {
// Nio instance
n := nio.New()
// Routes
n.GET("/", hello)
// Start server
log.Fatal(http.ListenAndServe(":1323", n))
}
// Handler
func hello(c nio.Context) error {
return c.String(http.StatusOK, "Hello, World!")
}
And finally run it
go run main.go
More examples
See examples
Built With
Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
Authors
- Andzej Maciusovic - Initial work - anjmao
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT License - see the LICENSE.md file for details
Acknowledgments
- This project is largely ispired by echo. Parts of the code are adopted from echo. See NOTICE.