Skip to content

Commit 9dc28c1

Browse files
author
Nexus
committed
docs: improve README with badges and quick start
1 parent 53ba4d6 commit 9dc28c1

1 file changed

Lines changed: 56 additions & 7 deletions

File tree

README.md

Lines changed: 56 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,66 @@
55
# DotWeb
66
Simple and easy go web micro framework
77

8-
Important: Now need go1.9+ version support, and support go mod.
8+
[![Go Version](https://img.shields.io/badge/Go-1.21+-00ADD8?style=for-the-badge&logo=go)](https://go.dev)
9+
[![GoDoc](https://pkg.go.dev/badge/github.com/devfeel/dotweb.svg)](https://pkg.go.dev/github.com/devfeel/dotweb)
10+
[![Go Report Card](https://goreportcard.com/badge/github.com/devfeel/dotweb)](https://goreportcard.com/report/github.com/devfeel/dotweb)
11+
[![Test](https://github.com/devfeel/dotweb/actions/workflows/ci.yml/badge.svg)](https://github.com/devfeel/dotweb/actions)
12+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
13+
[![Release](https://img.shields.io/github/v/release/devfeel/dotweb)](https://github.com/devfeel/dotweb/releases)
14+
[![Stars](https://img.shields.io/github/stars/devfeel/dotweb?style=social)](https://github.com/devfeel/dotweb/stargazers)
15+
16+
> A lightweight, fast and easy-to-use Go web framework
917
10-
Document: https://www.kancloud.cn/devfeel/dotweb/346608
18+
### Quick Start
1119

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+
)
1327

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
1466
[![Gitter](https://badges.gitter.im/devfeel/dotweb.svg)](https://gitter.im/devfeel-dotweb/wechat)
15-
[![GoDoc](https://godoc.org/github.com/devfeel/dotweb?status.svg)](https://godoc.org/github.com/devfeel/dotweb)
16-
[![Go Report Card](https://goreportcard.com/badge/github.com/devfeel/dotweb)](https://goreportcard.com/report/github.com/devfeel/dotweb)
17-
[![Go Build Card](https://travis-ci.org/devfeel/dotweb.svg?branch=master)](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>
1968
## 1. Install
2069

2170
```

0 commit comments

Comments
 (0)