侯体宗的博客 windows7+go语言+Beego框架安装使用

石可破,丹可磨
  • 首页
  • laravel8仿版
  • beego仿版
  • go_聊天
  • 人生
  • 技术
  • php
  • 架构
  • 数据库
  • 更多
    • 文件下载
    • 匿名群聊
    • 群聊(进来吹会!)
    • 留言
    • 九宫格抽奖
    • 拼图
    • 消消乐
    • 相册
    • 设置栏目
    • 更多设置
    • 分割线

windows7+go语言+Beego框架安装使用

Go  /  管理员 发布于 2020-12-07 18:23:47   150

学习go语言,不管三七二十一先找个star高的框架体验一下


1.beego安装

接上一篇文章,git啥都要装这我就不说了,我go环境已经装好,1.15.5

go get github.com/astaxie/beego //git命令下载beego
go get github.com/beego/bee     //git命令下载bee工具


GO111MODULE=on //开启

env -w GO111MODULE=on


把GOPATH的bin目录添加到环境变量中

C:\Users\Administrator>bee
Bee is a Fast and Flexible tool for managing your Beego Web Application.
USAGE
    bee command [arguments]
AVAILABLE COMMANDS
    version     Prints the current Bee version
    migrate     Runs database migrations
    api         Creates a Beego API application
    bale        Transforms non-Go files to Go source files
    fix         Fixes your application by making it compatible with newer versio
ns of Beego
    pro         Source code generator
    dlv         Start a debugging session using Delve
    dockerize   Generates a Dockerfile for your Beego application
    generate    Source code generator
    hprose      Creates an RPC application based on Hprose and Beego frameworks
    new         Creates a Beego application
    pack        Compresses a Beego application into a single file
    rs          Run customized scripts
    run         Run the application by starting a local development server
    server      serving static content over HTTP on port
    update      Update Bee
Use bee help [command] for more information about a command.
ADDITIONAL HELP TOPICS
Use bee help [topic] for more information about that topic.

bee的一些介绍

new 命令:

new命令创建一个Web项目,我们在命令下执行bee new <项目名>就可以创建一个新的项目。

api命令:

上面的new命令是用来创建新Web项目,不过很多用户使用beego来开发API应用,所以api命令是用来创建API应用


2.执行命令创建项目 进入D:\goblog\src>目录

D:\goblog\src\gblog>dir
 驱动器 D 中的卷是 软件
 卷的序列号是 0008-8176
 D:\goblog\src\gblog 的目录
2020\12\07 周一  18:00    <DIR>          .
2020\12\07 周一  18:00    <DIR>          ..
2020\12\07 周一  17:31    <DIR>          conf
2020\12\07 周一  17:31    <DIR>          controllers
2020\12\07 周一  18:00        13,658,624 gblog.exe
2020\12\07 周一  17:32               195 go.mod
2020\12\07 周一  17:32             5,732 go.sum
2020\12\07 周一  17:31               103 main.go
2020\12\07 周一  17:31    <DIR>          models
2020\12\07 周一  17:31    <DIR>          routers
2020\12\07 周一  17:31    <DIR>          static
2020\12\07 周一  17:31    <DIR>          tests
2020\12\07 周一  17:31    <DIR>          views
               4 个文件     13,664,654 字节
               9 个目录 116,428,435,456 可用字节


3.运行 我这里直接用ide 按Ctrl+r运行  看效果咯

1.png

浏览器:

2.png

昵称:

邮箱:

0条评论
最新最热
  • 分类目录
  • 人生 (119)
  • 技术 (46)
  • linux (23)
  • blog从零开始 (9)
  • php (48)
  • 架构 (14)
  • 前端 (22)
  • TP(3/5) (14)
  • 数据库 (29)
  • 微信 (2)
  • Laravel (56)
  • Redis (3)
  • Docker (2)
  • Go (8)
  • 近期文章
  • PHP程序员2021年最新面试题集-持续更新中...(0个评论)
  • PHP数组的底层实现原理浅析(0个评论)
  • php7垃圾回收变量的GC机制详解(0个评论)
  • 在Laravel中进行类型转换详解(0个评论)
  • mysql数据库中事务的四个特征及四种隔离级别的浅析描述(0个评论)
  • Linux awk 命令及统计nginx日志里访问次数最多的前十个IP(0个评论)
  • 论不要在mysql中使用[utf8]编码,如果要用请用[utf8mb4](0个评论)
  • JWT源码实现逻辑详解(0个评论)
  • Laravel内核分析-设计模式之观察者模式(0个评论)
  • Laravel内核分析-设计模式之装饰模式(0个评论)
  • 近期评论
  • 博主 在

    国内用什么翻墙使用谷歌?上外网神器Ghelper插件详解中评论 @请教  小图标没有出现 重复检查步骤5,进去看看右下角是否开启..
  • 请教 在

    国内用什么翻墙使用谷歌?上外网神器Ghelper插件详解中评论 你好,我也遇到了安装完右上角没有显示图标,也不能打开相关网页的问题,用的是谷歌浏..
  • Test11 在

    laravel查询构造器中whereNotKey,whereKey,firstWhere用法详解中评论 <script>alert(\test\)</script&g..
  • 博主 在

    国内用什么翻墙使用谷歌?上外网神器Ghelper插件详解中评论 @西瓜: 每一步都操作完达到效果了吗? 对了是用谷歌浏览器吧..
  • 西瓜 在

    国内用什么翻墙使用谷歌?上外网神器Ghelper插件详解中评论 你好 我安装完右上角没有显示图标,也不能打开相关网页,是怎么回事呢?..
  • 文章归档
  • 2016-10 (34)
  • 2016-11 (21)
  • 2017-06 (5)
  • 2017-07 (11)
  • 2017-08 (6)
  • 2017-09 (7)
  • 2017-10 (11)
  • 2017-11 (4)
  • 2017-12 (3)
  • 2018-01 (9)
  • 2018-02 (2)
  • 2018-03 (2)
  • 2018-04 (1)
  • 2018-05 (3)
  • 2018-06 (1)
  • 2018-10 (1)
  • 2018-11 (1)
  • 2020-03 (5)
  • 2020-04 (85)
  • 2020-05 (42)
  • 2020-06 (35)
  • 2020-07 (22)
  • 2020-08 (11)
  • 2020-09 (14)
  • 2020-10 (7)
  • 2020-11 (8)
  • 2020-12 (6)
  • 2021-01 (6)
  • 2021-02 (6)
  • 2021-03 (2)
Top
  • 友情链接
  • 侯体宗的博客
  • 三防加固笔记本
  • 澜溪博客
  • 心中hope
  • 徒步认知的博客
  • 陈大剩博客
  • 赵波的博客
  • 佘春晓的博客
  • 自动友链系统

Auther ·HouTiZong© 2009-2020 zongscan.com 版权所有ICP证: 粤ICP备20027696号 PHP交流群 也可以扫右边的二维码

侯体宗的博客