O'Reilly logo

Go Web Development Cookbook by Arpit Aggarwal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it…

  1. Because the application created by bee is in the development mode by default and it’s always a best practice to run an application in the production mode on the public facing servers, we have to change the RunMode as prod in $GOPATH/src/my-first-beego-project/conf/app.conf, as follows:
beego.RunMode = "prod"
  1. Include static files, configuration files, and templates as part of the Beego application bytecode file in a separate directory by executing the following commands:
$ mkdir $GOPATH/my-first-beego-app-deployment$ cp my-first-beego-project $GOPATH/my-first-beego-app-deployment$ cp -fr views $GOPATH/my-first-beego-app-deployment$ cp -fr static $GOPATH/my-first-beego-app-deployment$ cp -fr conf $GOPATH/my-first-beego-app-deployment ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required