module
Version:
v0.0.0-...-6f5c55b
Opens a new window with list of versions in this module.
Published: Oct 11, 2021
License: MIT
Opens a new window with license information.
README
¶
JGo Web
Overview
- Simple routing
- Automatic template rendering based on request path
- Response object with support for common functionality, e.g.:
- Getting form and header data
- Redirects
- Sessions with validatable tokens
- Enforceable CSRF tokens
- WebSockets
- Example app with:
- User accounts
- Shared HTML templates (e.g. header)
- SQLite database
- Chatroom
Docs
https://godoc.org/github.com/jchavannes/jgo
Example
package main
import (
"github.com/jchavannes/jgo/web"
)
func main() {
server := web.Server{
Port: 80,
Routes: []web.Route{{
Pattern: "/hello",
Handler: func(r *web.Response) {
r.Write("world")
},
}},
}
server.Run()
}
License
See the LICENSE file for license rights and limitations (MIT).
Directories
¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Web abstracts http request and response handling.
|
Web abstracts http request and response handling. |
Click to show internal directories.
Click to hide internal directories.