https://github.com/aisk/vox
Simple and lightweight Go web framework inspired by koa
https://github.com/aisk/vox
express go golang koa lightweight lightweight-framework sinatra web webframework
Last synced: 8 months ago
JSON representation
Simple and lightweight Go web framework inspired by koa
- Host: GitHub
- URL: https://github.com/aisk/vox
- Owner: aisk
- License: mit
- Created: 2014-12-24T11:22:08.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T04:57:26.000Z (about 3 years ago)
- Last Synced: 2025-05-01T11:55:58.336Z (8 months ago)
- Topics: express, go, golang, koa, lightweight, lightweight-framework, sinatra, web, webframework
- Language: Go
- Homepage: https://aisk.github.io/vox/
- Size: 76.2 KB
- Stars: 84
- Watchers: 4
- Forks: 7
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go-extra - vox - 12-24T11:22:08Z|2021-05-31T16:20:33Z| (Web Frameworks / Fail injection)
- awesome-go - vox
- awesome-go - vox - A golang web framework for humans, inspired by Koa heavily. (Web Frameworks / Utility/Miscellaneous)
- awesome-go - vox - Go web framework inspired by koa - ★ 11 (Web Frameworks)
- awesome-go - vox - A golang web framework for humans, inspired by Koa heavily. (Web Frameworks / Utility/Miscellaneous)
- awesome-go - vox - A golang web framework for humans, inspired by Koa heavily. - :arrow_down:0 - :star:4 (Web Frameworks / HTTP Clients)
- awesome-go - vox - A golang web framework for humans, inspired by Koa heavily. (Web Frameworks / HTTP Clients)
- awesome-go - vox - A golang web framework for humans, inspired by Koa heavily. (Web Frameworks / Utility/Miscellaneous)
- awesome-go-cn - vox
- awesome-Char - vox - A golang web framework for humans, inspired by Koa heavily. (Web Frameworks / HTTP Clients)
- awesome-go-cn - vox
README
# VOX
[](https://pkg.go.dev/github.com/aisk/vox)
[](https://travis-ci.org/aisk/vox)
[](https://codecov.io/gh/aisk/vox)
[](https://goreportcard.com/report/github.com/aisk/vox)
[](https://codeclimate.com/github/aisk/vox/maintainability)
[](https://gitter.im/go-vox/Lobby)
A golang web framework for humans, inspired by [Koa](http://koajs.com) heavily.

## Getting started
### Installation
Using the `go get` power:
```sh
$ go get -u github.com/aisk/vox
```
### Basic Web Application
```go
package main
import (
"fmt"
"time"
"github.com/aisk/vox"
)
func main() {
app := vox.New()
// custom middleware that add a x-response-time to the response header
app.Use(func(ctx *vox.Context, req *vox.Request, res *vox.Response) {
start := time.Now()
ctx.Next()
duration := time.Now().Sub(start)
res.Header.Set("X-Response-Time", fmt.Sprintf("%s", duration))
})
// router param
app.Get("/hello/{name}", func(ctx *vox.Context, req *vox.Request, res *vox.Response) {
res.Body = "Hello, " + req.Params["name"] + "!"
})
app.Run("localhost:3000")
}
```
## More Docs
https://aisk.github.io/vox/
## Need Support?
If you need help for using vox, or have other questions, welcome to our [gitter chat room](https://gitter.im/go-vox/Lobby).
## About the Project
Vox is © 2016-2020 by [aisk](https://github.com/aisk).
### License
Vox is distributed by a [MIT license](https://github.com/aisk/vox/tree/master/LICENSE).