框架网页(网页安排框架)

框架网页(网页安排框架)

简称gf

载入地方

https://github.com/gogf/gf-cli【脚手架东西】

框架网页(网页安排框架) 第1张

1、Go Frame框架进修官方文书档案1

Go Frame 框架官方网站

2、载入gf-cli(Go Frame开拓东西链)东西开源名目地方,供给了百般操纵体例本子和安置本领

完备吩咐1

D:\goland\代码区\test1>gfUSAGE

    gf COMMAND [ARGUMENT] [OPTION]COMMAND

    env        show current Golang environment variables

    get        install or update GF to system in default...

    gen        automatically generate go files for ORM models...

    mod        extra features for go modules...

    run        running go codes with hot-compiled-like feature...

    init       create and initialize an empty GF project...

    help       show more information about a specified command

    pack       packing any file/directory to a resource file, or a go file...

    build      cross-building go project for lots of platforms...

    docker     create a docker image for current GF project...

    swagger    swagger fe口口网ature for current project...

    update     update current gf binary to latest one (might need root/admin permission)

    install    install gf binary to system (might need root/admin permission)

    version    show current binary version infoOPTION

    -y         all yes for all command without prompt ask

    -?,-h      show this help or detail for specified command

    -v,-i      show version informationADDITIONAL

    Use 'gf help COMMAND' or 'gf COMMAND -h' for detail about a command, which has '...'

    in the tail of their comments.3、需要领会创造数据库数据库自行按照自己所做网站建立。1

4、建立初始化名目D:\goland\代码区\web>gf init web1

5、编写摆设文献(默许在config下)# HTTP Server摆设[server]

    Address           &nbs口口网p; = ":8119"       //端标语

    ServerRoot          = "/"            //静态资源路途

    FileServerEnabled   = true

    S口口网essionMaxAge       = "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

框架网页(网页安排框架) 第2张