.png) In the File Manager view on the left side of the page, You can see the ' Go/src/myapp ' directory. Click on the folder and open it to see what's inside. [File Manager view] (https://raw.githubusercontent.com/studygolang/gctt-images/master/go-revel/20180323110203.png) You'll see a lot of go/inside. Revel file. # # Open Revel server now, you can run the progr
,但是代码在github上还是有的。所以,还是可以手动下载,之后配置上的。Here's another great tool to know about go: http://gopm.io/. This is a nodejs-like NPM tool. He will download the corresponding go package according to the version number, not git, Hg or anything. You can download this tool or click Download to go to the download page (here: http://gopm.io/download). Then enter golang.org/x/netin the import path and click Download. The package is downloaded.After the download is su
,但是代码在github上还是有的。所以,还是可以手动下载,之后配置上的。Here's another great tool to know about go: http://gopm.io/. This is a nodejs-like NPM tool. He will download the corresponding go package according to the version number, not git, Hg or anything. You can download this tool or click Download to go to the download page (here:http://gopm.io/download). Then enter golang.org/x/netin the import path and click Download. The package is downloaded.After the download is suc
github.com/revel/cmd/revel。好的这个时候你会报错说无法import到websocket这个包。感谢伟大的全国防火墙,这部分的代码被屏蔽了。虽然直接下载不行,但是代码在github上还是有的。所以,还是可以手动下载,之后配置上的。
Here's another great tool to know about go: http://gopm.io/. This is a nodejs-like NPM tool. He will download the corresponding go package according to the version number, not git, Hg or anything. You can download this tool or click Dow
server-side compilation
With this deployment, you avoid the inconvenience of cross compilation, but you need to install the GO environment and Revel Framework on the server side. By using Git, the client-submitted code can get all the changes directly on the server via Git pull and then compile and run directly on the server side.
Because git itself is an incremental get code churn, it can save a lot of time compared to the client-compiled upload a
. "Home" "Active"}}{{template "header.html".}}
Add our handling methods in App/controllers/app.go:
Func (c App) bloginfor () Revel. Result {return C.render ()}
Add a path to the conf/routes:
GET /bloginfor app.bloginfor
OK in the address with http://localhost:9000/bloginfor access to see, the effect:
Let's implement it.
2. Implement Comment functionFirst look at the link content of the title in our index.html:
/bloginfor/{{$blo
This is a creation in
Article, where the information may have evolved or changed.
Revel Frame Installation
Official website: http://revel.github.io/tutorial/index.htmlChinese community: http://www.gorevel.cn/
First, install the Revel frameDownload the Revel framework source code, put its source into the%gopath%src/github.com/
HG
Go get clones rely on Git and Mercurial
· Installing Git
· Installing Mercurial
Reference:http://www.cnblogs.com/ghj1976/archive/2013/03/08/2949237.html
Iv. access to the Revel framework
Go get Github.com/robfig/revel
If Gopathis not set, it will be downloaded to the goroot directory or downloaded to the first directory in Gopath .
Reference:http://www.cnblogs.com/ghj1976/archive/2013/03/08/294923
This is a creation in
Article, where the information may have evolved or changed.
This article introduces the setting up of node. js, Golang and other environments under Ubuntu, and the difference between MAC installation is only two points:
When installing Golang dependent libraries, use brew install xxx instead sudo apt-get xxx ;
When installing Golang, do not need to download the source code compilation and set PATH, only need to download go pkg file on Golang official website, doubl
This is a creation in
Article, where the information may have evolved or changed.
This article for a detailed look at the Revel command-line tool. Here are a few files for this package, along with the corresponding feature descriptions.
Filename
Brief description (short)
Full Description (Long)
Clean.go
Clean a Revel application ' s temp files
The
This is a creation in
Article, where the information may have evolved or changed.
Demo Address http://gblog-revel.herokuapp.com/
1. Implement Message BoardWe did a simple design in the previous chapter, pick on the message form has, then .....
First, create a new message.go content under App/models:
Package Modelsimport ("Github.com/revel/revel" "Labix.org/v2/mgo/bson" "Time") type Message struct{email s
1. First refer to a linkhttp://blog.csdn.net/creak_phone/article/details/12620969http://www.geek521.com/?p=6162. Install go, many online, you can refer to: http://www.cnblogs.com/hello-ruby/p/4546790.html3. Set GopathØmac Configuration GopathMac can be set in the ~/.bash_profile file.(Note: 1.) If you do not have a. bash_profile file, create one.2. If this document is available, the two sentences are appended at the end. )Export Gopath= $HOME/mygoExport path= $PATH: $HOME/mygo/binNote: If you do
This is a creation in
Article, where the information may have evolved or changed.
Since the Revel framework itself does not provide any guidance for the writing of the model layer, there is some hesitation in designing this part, and it is a good practice to reconsider what is best.
I was just beginning to get tangled up when I was doing the hillside net, unsure where the creation and destruction of MongoDB's session should be handled. Until one day
This is a creation in
Article, where the information may have evolved or changed.
1. Installing the Revel Frame
$ go get github.com/revel/revel
2. Install the Revel command line tool
$ go get github.com/revel/cmd/revel
3. Create
Then the last record of the Win7 Go environment, go development, now in addition to sublime, liteide more recommended, download linksAfter downloading the installation directly, you need to configure the next go environment (this machine is using Windows 386 version), as follows:Open the file configuration in the following places:Next, create a new CMD program test:Create a simple "command line" program here, the project location defaults to Gopath below, here is "main", click "OK", Liteide auto
This is a created
article in which the information may have evolved or changed.
Introduction: A high-productivity Web framework for the Go language, modeled on play! Framework.
Is Revel's logo, which is an efficient Go language web framework written in Java's play! framework.Project Address: http://robfig.github.com/revel/Source Address: Https://github.com/robfig/revel
Features: Hot compilation,
This is a creation in
Article, where the information may have evolved or changed.
Use advanced technology to build a go web development environment1. Installing the Go language does not introduce too much here, just execute the following command
Brew Install Go
2. Configure Gopath to add the following configuration in/etc/profile
export gopath= "/USR/LOCAL/CELLAR/GO/1.5.1/" Export path= "/usr/local/cellar/go/1.5.1/bin: $PATH"
Where the/USR/LOCAL/CELLAR/GO/1.5.1/directory is the loc
This is a creation in
Article, where the information may have evolved or changed.
Then the last record of the Win7 Go environment, go development, now in addition to sublime, liteide more recommended, download links
After downloading the installation directly, you need to configure the next go environment (this machine is using Windows 386 version), as follows:
Open the file configuration in the following places:
Next, create a new CMD program test:
Create a simple "command line" program here
, download the dependency package
Go get Golang.org/x/tools/cmd/vet
Go get Golang.org/x/tools/cmd/godoc
Go get Github.com/nsf/gocode
Go get github.com/jstemmer/gotags
#MongoDB Client
Go get gopkg.in/mgo.v2
#Mysql Client
Go get Github.com/go-sql-driver/mysql
#Redis Client
Go get Github.com/garyburd/redigo/redis
2.3. Configure Revel Environment
Go get Github.com/revel/r
Add a new profile to your Revel projectConf/my.conf, the contents are as follows:# Site Information Configuration[Website]website.version=1.0website.sitedomain=On-line search for half a day, unexpectedly did not find Revel configuration How to read, began to directly use the "Github.com/robfig/config" library (of course Revel itself also use this library), this i
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.