框架网页(网页设计框架)

/ 0评 / 0

框架网页(网页设计框架)

简称gf百思特网

下载地址

https://github.com/gogf/gf-cli【脚手架工具】

1、Go Frame框架学习

官方文档

Go Frame 框架官方网站

2、下载gf-cli(Go Frame开发工具链)

工具开源项目地址,供给了各种操作体系版本和安装办法

完全命令
D:\goland\代码区\test1>gfUSAGEgfCOMMAND[ARGUMENT][OPTION]COMMANDenvshowcurrentGolangenvironmentvariablesgetinstallorupdateGFtosystemindefault...genautomaticallygenerategofilesforORMmodels...modextrafeaturesforgomodules...runrunninggocodeswithhot-compiled-likefeature...initcreateandinitializeanemptyGFproject...helpshowmoreinformationaboutaspecifiedcommandpackpackinganyfile/directorytoaresourcefile,oragofile...buildcross-buildinggoprojectforlotsofplatforms...dockercreateadockerimageforcurrentGFproject...swaggerswaggerfeatureforcurrentproject...updateupdatecurrentgfbinarytolatestone(mightneedroot/adminpermission)ins百思特网tallinstallgfbinarytosystem(mightneedroot/adminpermission)versionshowcurrentbinaryversioninfoOPTION-yallyesforallcommandwithoutpromptask-?,-hshowthishelpordetailforspecifiedcommand-v,-ishowversioninformationADDITIONALUse'gfhelpCOMMAND'or'gfCOMMAND-h'fordetailaboutacommand,whichhas'...'inthetailoftheircomments.

3、需求剖析创立数据库

数据库自行依据自身所做网站构建。

4、构建初始化项目

D:\goland\代码区\web>gfinitweb

5、编写配置文件(默认在config下)

#HTTPServer配置[server]Address=":8119"//端口号ServerRoot="/"//静态资源(www.isoyu.com原创版权)路径FileServerEnabled=trueSessionMaxAge="30min"#Logger.[logger]Path="/tmp/log/yj-app"Level="all"Stdout=true#Template.[viewer]Path&nbs百思特网p;="template"DefaultFile="index.html"Delimiters=["{{","}}"]#Databaseconfigurations.[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