GitXplorerGitXplorer
a

vox

public
84 stars
7 forks
8 issues

Commits

List of commits on branch master.
Unverified
b119a5312606bb23fc8f4411f2d8d137968aa207

Add highlight to the readme example

tthechampagne committed 2 years ago
Unverified
40cd8ba93f61ad054d69dd99e949336a464ada7e

✨ support disable logging by app config

aaisk committed 2 years ago
Unverified
e4af29d73b2121f9dd8d6825e337b6ce14245f3f

🔥 remove unused codes

aaisk committed 2 years ago
Unverified
82f24c2efb7f899859fb81ad9e6615f5a2d97a24

✨ support using error as response body

aaisk committed 2 years ago
Unverified
6121bdb13e8abe86b785ecfde0514dbb6a6bd5c1

Upgrade to GitHub-native Dependabot

ddependabot-preview[bot] committed 4 years ago
Unverified
4bf8fc732d9f0e300071401c1075903693ffc577

📄 update license

aaisk committed 4 years ago

README

The README file for this repository.

VOX

Go Reference Build Status Codecov Go Report Card Maintainability Gitter chat

A golang web framework for humans, inspired by Koa heavily.

VoxLogo

Getting started

Installation

Using the go get power:

$ go get -u github.com/aisk/vox

Basic Web Application

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.

About the Project

Vox is © 2016-2020 by aisk.

License

Vox is distributed by a MIT license.