# README
easyweb
like streamlit, can quickly generate a web
how work
- Server and client interact through websocket
- The elements of the page are dynamically generated by jquery
- The user opens the page, and the page connects to the server through websocket
- The server executes the code, dynamically creates elements, and sends them to the client
- The elements(First-level) have a unique id, through which to create, update, delete
- websocket + jquery(3.7.0 local) + bootstrap(5.3.0 cdn)
exampel
package main
import (
"fmt"
"net/http"
"time"
"github.com/lengzhao/easyweb"
"github.com/lengzhao/easyweb/e"
)
func main() {
easyweb.RegisterPage(func(page easyweb.Page) {
page.Title("MyWeb")
page.Write("this is my first ui.")
}, easyweb.DefaultPagePath...)
http.ListenAndServe(":8080", nil)
}
The browser opens http://localhost:8080
For more examples, please see the example folder
# Functions
RegisterPage registers a page function to handle HTTP requests for the specified path patterns.
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
# Interfaces
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author