|
5 | 5 | # DotWeb |
6 | 6 | Simple and easy go web micro framework |
7 | 7 |
|
8 | | -Important: Now need go1.9+ version support, and support go mod. |
| 8 | +[](https://go.dev) |
| 9 | +[](https://pkg.go.dev/github.com/devfeel/dotweb) |
| 10 | +[](https://goreportcard.com/report/github.com/devfeel/dotweb) |
| 11 | +[](https://github.com/devfeel/dotweb/actions) |
| 12 | +[](https://opensource.org/licenses/MIT) |
| 13 | +[](https://github.com/devfeel/dotweb/releases) |
| 14 | +[](https://github.com/devfeel/dotweb/stargazers) |
| 15 | + |
| 16 | +> A lightweight, fast and easy-to-use Go web framework |
9 | 17 |
|
10 | | -Document: https://www.kancloud.cn/devfeel/dotweb/346608 |
| 18 | +### Quick Start |
11 | 19 |
|
12 | | -Guide: https://github.com/devfeel/dotweb/blob/master/docs/GUIDE.md |
| 20 | +```go |
| 21 | +package main |
| 22 | + |
| 23 | +import ( |
| 24 | + "fmt" |
| 25 | + "github.com/devfeel/dotweb" |
| 26 | +) |
13 | 27 |
|
| 28 | +func main() { |
| 29 | + app := dotweb.New() |
| 30 | + |
| 31 | + app.HttpServer.GET("/hello", func(ctx dotweb.Context) error { |
| 32 | + return ctx.WriteString("Hello, World!") |
| 33 | + }) |
| 34 | + |
| 35 | + fmt.Println("Server starting on :8080") |
| 36 | + app.StartServer(8080) |
| 37 | +} |
| 38 | +``` |
| 39 | + |
| 40 | +```bash |
| 41 | +go run main.go |
| 42 | +# Visit http://localhost:8080/hello |
| 43 | +``` |
| 44 | + |
| 45 | +### Installation |
| 46 | + |
| 47 | +```bash |
| 48 | +go get github.com/devfeel/dotweb |
| 49 | +``` |
| 50 | + |
| 51 | +### Key Features |
| 52 | +- **Router**: Static, parameterized, and grouped routes |
| 53 | +- **Middleware**: App, Group, and Router level middleware |
| 54 | +- **Session**: Built-in session with Redis support |
| 55 | +- **Cache**: Multiple cache providers |
| 56 | +- **WebSocket**: Full WebSocket support |
| 57 | +- **TLS**: Built-in HTTPS support |
| 58 | +- **Hot Reload**: Development mode with auto-reload |
| 59 | + |
| 60 | +### Documentation |
| 61 | +- [中文文档](https://www.kancloud.cn/devfeel/dotweb/346608) |
| 62 | +- [English Guide](https://github.com/devfeel/dotweb/blob/master/docs/GUIDE.md) |
| 63 | +- [Examples](https://github.com/devfeel/dotweb-example) |
| 64 | + |
| 65 | +### Community |
14 | 66 | [](https://gitter.im/devfeel-dotweb/wechat) |
15 | | -[](https://godoc.org/github.com/devfeel/dotweb) |
16 | | -[](https://goreportcard.com/report/github.com/devfeel/dotweb) |
17 | | -[](https://travis-ci.org/devfeel/dotweb.svg?branch=master) |
18 | | -<a target="_blank" href="http://shang.qq.com/wpa/qunwpa?idkey=836e11667837ad674462a4a97fb21fba487cd3dff5b2e1ca0d7ea4c2324b4574"><img border="0" src="http://pub.idqqimg.com/wpa/images/group.png" alt="Golang-Devfeel" title="Golang-Devfeel"></a> |
| 67 | +<a target="_blank" href="http://shang.qq.com/wpa/qunwpa?idkey=836e11673837ad674462a4a97fb21fba487cd3dff5b2e1ca0d7ea4c2324b4574"><img border="0" src="http://pub.idqqimg.com/wpa/images/group.png" alt="Golang-Devfeel" title="Golang-Devfeel"></a> |
19 | 68 | ## 1. Install |
20 | 69 |
|
21 | 70 | ``` |
|
0 commit comments