Skip to content

gwaylib/eweb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fork and modify from:

https://github.com/ot24net/eweb
https://github.com/labstack/echo

Changes:

* Make up global route of echo.Echo 
* Make up log output and add H reference gin, it is really good.
* Be careful! We use text/template instead the html/template
* Some new features, such as quic

Why base on echo?

* I like the return design in routing. It can make the compilation more reassuring. When return is missing, it will prompt compilation errors.
* I need to replace some features, it make me easy to changed it.
* These are the easiest to substitute when I tried to use them many years ago.

Static File Support

eweb.Static("/", "./public") // echo supported


// os file support 
fs, err := os.Open("./public")
if err != nil{
  panic(err)
}
eweb.StaticFS("/", http.FS(fs))

// embed file support
// fs equal embed.FS
eweb.StaticFS("/", http.FS(fs))