LoginSignup
3
3

More than 5 years have passed since last update.

Go の導入と Revel 導入手順

Last updated at Posted at 2014-10-22

初めに

検証環境は Mac のみで、 brew コマンドが入っているのを前提に進めます。

インストール

Homebrew が入っているのでそれを使ってインストールします。

brew install go

次に revel のインストールで mercurial が必要なので、同時にインストールします。

brew install mercurial

設定

まずは GOPATH という go の環境やアプリケーションが入るディレクトリを指定する必要があるようです。
.zsh-profile や .bashrc などに以下の記述を追加します。

export GOPATH=~/Programming/go/
export PATH=\$PATH:$GOPATH/bin

※ ~/Programming/go を go のファイルを設置したい場所へ変更します。

revel のダウンロード

公式にあるとおりにサンプルをダウンロードします。

go get github.com/revel/cmd/revel

revel サンプルアプリケーションを実行

revel run github.com/revel/revel/samples/chat

これで、ブラウザで localhost:9000 にアクセスするとサンプルのチャットアプリケーションが実行されます。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3