beego的官方网址:https://beego.me

参考文档:https://beego.me/quickstart

1:安装

  您需要安装 Go 1.1+ 以确保所有功能的正常使用。

  需要已经设置GOPATH和GOROOT,不会设置可以参考我的另一篇文档

  你需要安装或者升级 Beego 和 Bee 的开发工具:

    go get -u github.com/astaxie/beego
    go get -u github.com/beego/bee

2:创建项目
  linux平台
    $ cd $GOPATH/src
    $ bee new blog
    $ cd blog
    $ bee run blog

  windows平台
    >cd %GOPATH%/src
    >bee new blog
    >cd blog
    >bee run blog
 或者直接./blog 

3:supervisor管理
  [program:goBlog]
  directory=/code/goDemo/src/blog/
  command=/code/goDemo/src/blog/blog
  stdout_logfile=/root/log/blog_$(date -I).log
  autostart=true
  autorestart=true
  startsecs=5
  priority=1
  stopasgroup=true
  killasgroup=true


4:配置nginx代理
  listen 80;
  server_name blog.xxx.com;

  location / {
    root html;
    index index.html index.htm;
    proxy_pass http://127.0.0.1:8080;
  }





相关文章:

  • 2021-09-01
  • 2022-12-23
  • 2021-12-04
  • 2021-12-04
  • 2021-12-04
  • 2021-11-30
  • 2021-12-12
  • 2021-12-10
猜你喜欢
  • 2022-12-23
  • 2021-05-04
  • 2021-10-18
  • 2021-11-15
  • 2021-06-21
相关资源
相似解决方案