网页设计框架 框架网页


网页设计框架 框架网页

文章插图
网页(网页设计框架)
简称Gf
下载地址
Https://github.com/gogf/gf-cli[脚手架工具]
1.Go框架框架学习官方文档一个
【网页设计框架 框架网页】Go Frame框架官方网站
2.下载gf-cli(Go Frame开发工具链)工具的开源项目地址,提供各种操作系统版本和安装方法 。
完整命令一个
D:\goland\代码区\test1>gfUSAGEgf COMMAND [ARGUMENT] [OPTION]COMMANDenvshow current Golang environment variablesgetinstall or update GF to system in default...genautomatically generate go files for ORM models...modextra features for go modules...runrunning go codes with hot-compiled-like feature...initcreate and initialize an empty GF project...helpshow more information about a specified commandpackpacking any file/directory to a resource file, or a go file...buildcross-building go project for lots of platforms...dockercreate a docker image for current GF project...swaggerswagger feature for current project...updateupdate current gf binary to latest one (might need root/admin permission)installinstall gf binary to system (might need root/admin permission)versionshow current binary version infoOPTION-yall yes for all command without prompt ask&nb信息资源网sp;-?,-hshow this help or detail for specified command-v,-ishow version informationADDITIONALUse 'gf help COMMAND' or 'gf COMMAND -h' for detail about a command, which has '...'in the tail of their comments.3.需求分析和数据库创建 。数据库自行根据自身所做网站构建 。一个
4.生成初始化项目 。D:\goland\代码区\web>gf init web一个


5.编写配置文件(默认情况下在config下)# HTTP Server配置[server]Address= ":8119"//端口号ServerRoot= "/"&nb信息资源网sp;//静态资源路径FileServerEnabled= trueSessionMaxAge= "30min"# 信息资源网Logger.[logger]Path= "/tmp/log/yj-app"Level= "all"Stdout= true# Template.[viewer]Path= "template"DefaultFile = "index.html"Delimiters=["{{", "}}"]# Database configurations.[database]link= "mysql:root:root@tcp(localhost:3306)/goframe_test"//账号:root密码:root数据库:goframe_testdebug = true# 数据库日志对象配置[database.logger]Path= "/tmp/log/gf-demos/sql"Level= "all"Stdout = true


    推荐阅读