This article walks through the installation process.
To use Revel, you first need to install Go.
If you did not create a GOPATH as part of installation, do so now. Your GOPATH is a directory tree where all of your Go code will live. Here are the steps to do that:
mkdir ~/gocode
export GOPATH=~/gocode
echo GOPATH=$GOPATH >> .bash_profile
Now your Go installation is complete.
Both Git and Mercurial are required to allow go get
to clone various dependencies.
To get the Revel framework, run
go get github.com/robfig/revel
This command does a couple things:
$GOPATH/src/github.com/robfig/revel/
go get
on them as well.The Revel command line tool is how you build, run, and package Revel applications.
Use go get
to install it:
go get github.com/robfig/revel/revel
Then, ensure the $GOPATH/bin directory is in your PATH so that you can reference the command from anywhere.
export PATH="$PATH:$GOPATH/bin"
echo 'PATH="$PATH:$GOPATH/bin"' >> .bash_profile
Lastly, let’s verify that it works:
$ revel help
~
~ revel! http://robfig.github.com/revel
~
usage: revel command [arguments]
The commands are:
run run a Revel application
new create a skeleton Revel application
clean clean a Revel application's temp files
package package a Revel application (e.g. for deployment)
Use "revel help [command]" for more information.
Now we are all set up.