Dockerfile LICENSE Procfile README.md build.sh httpstaticserver.go ipa.go main.go openid-login.go res.go res_bindata.go res_nobindata.go utils.go utils_test.go zip.go zip_test.go README MIT license gohttpserver Goal: Make the best HTTP File Server. ...
widuu/staticserver master 1Branch0Tags Code Repository files navigation README ###一百行golng代码写一个静态文件服务器 ###包含功能 静态文件模板 文件上传 文件查看和下载 ###使用的包 import ( "fmt" "html/template" "io" "net/http" "os" "path/filepath" "regexp" "strconv" "time" ) #...
func StaticServer(w http.ResponseWriter, req *http.Request) { staticHandler := http.FileServer(http.Dir("./public/")) staticHandler.ServeHTTP(w, req) return } func main(){ http.HandleFunc( "/",Handler) http.HandleFunc( "/public",StaticServer) s := &http.Server{ Addr: ":8181", } ...
Use config file. specfied with--conf, seeexample config.yml. Note that command line option can overwrite conf inconfig.yml ipa plist proxy This is used for server which not https enabled. default usehttps://plistproxy.herokuapp.com/plist ./gohttpserver --plistproxy=https://someproxyhost.co...
martini.go实现了ServerHTTP方法。 代码语言:javascript 代码运行次数:0 运行 AI代码解释 // ServeHTTP is the HTTP Entry point for a Martini instance. Useful if you want to control your own HTTP server.func(m*Martini)ServeHTTP(res http.ResponseWriter,req*http.Request){m.createContext(res,req).run...
(static.Serve("/",static.LocalFile("./public",false)))// 其他路径 /other-place// r.Use(static.Serve("/other-place", static.LocalFile("./public", false)))r.GET("/ping",func(c*gin.Context){c.String(200,"test")})// Listen and Server in 0.0.0.0:8080iferr:=r.Run(":8080")...
(static.Serve("/",static.LocalFile("./public",false)))// 其他路径 /other-place// r.Use(static.Serve("/other-place", static.LocalFile("./public", false)))r.GET("/ping",func(c*gin.Context){c.String(200,"test")})// Listen and Server in 0.0.0.0:8080iferr:=r.Run(":8080")...
server { listen 80; server_name ds.; location / { proxy_pass http://java; } location ~* .*\.(png|gif|jpg|css|js)$ { proxy_pass http://static; } } [root@lb01 conf.d]# systemctl restart nginx 1. 2. 3. 4. 5. 6. ...
elgohr/Publish-Docker-Github-Action@master with: name: gwuhaolin/projectname/http-server username: gwuhaolin password: ${ { github.token } } registry: docker.pkg.github.com dockerfile: http/Dockerfile workdir: ./ 每次您向 GitHub 推送代码后都会自动触发构建生产最新的 Graph...
go 静态文件代码: router.Static("/vue_assets","./vue_static/vue_assets") 错误信息 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec. ...