scryinfo / dot Goto Github PK
View Code? Open in Web Editor NEWScry Componentized development framework
License: MIT License
Scry Componentized development framework
License: MIT License
类似一下方法:
d.Engine_.GinEngine().GET("/", func(ctx *gin.Context) {
ctx.Redirect(http.StatusFound, d.UrlRelativePath()+"/home.html")
})
//for dev
{
if !sfile.ExistFile(d.ResAbsolutePath("dist")) {
dot.Logger().Debugln("UiPreAdd", zap.String("", "../../ui"))
d.SetResRelativePath("../../ui")
}
}
通过配置的方式实现,减少路由冲突以及修改方便。
fix the cmd parameter naming conflicts with micro
通过可选配置的形式在生成dao代码的时候选择uuid或者自增类型
in old version "github.com/improbable-eng/grpc-web", it can not modify the "endpointsFunc", so we do follow:
if len(c.preUrl) > 0 { // because can not set the "endpointFunc" of WrapServer, do this so so
old := ctx.Request.URL.Path
if strings.HasPrefix(old, c.preUrl) {
index := len(c.preUrl) - 1
ctx.Request.URL.Path = old[index:]
}
}
but in new version, can modiry the "endpointsFunc", it will be better to replace with "endpointsFunc"
sample :
//Warn warn
func (log *sLogger) Warn(mstr dot.MakeStringer) {
if dot.WarnLevel <= log.GetLevel() {
log.Logger.Warn(funLog, zap.String("", mstr()))
}
}
在使用Engine组件时将http升级为https时需要配置keyFile和pemFile两个文件,在使用openssl生成证书文件过程中会生成私钥、公钥以及证书三个文件,就文件格式而言他们都可以是pem格式,为了避免不了解的人配置出错,建议将PemFile修改为CertFile。跟踪代码进入到gin提供的RunTLS函数,它的命名建议也是certFile和keyFile
1, if the package name is "dao" and model name is "notice", then file is "../dao/notice_dao.go"
2, if the file exist, then generate into current path
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.