Revel Tool

revel version

  • Displays the Revel Framework and Go version.
  1. revel version

revel new [import_path] [skeleton]

Creates a few files to get a new Revel application running quickly.

  • Copies files from the skeleton/ directory
  • Under multi GOPATH scenario, Revel detects the current working directory with GOPATH and generates the project
  • Skeleton is an optional argument, provided as an alternate skeleton path
  1. revel new bitbucket.org/myorg/my-app

revel run [import_path] [run_mode] [port]

  1. // run in dev mode
  2. revel run github.com/mycorp/mega-app
  3. // run in prod mode on port 9999
  4. revel run github.com/mycorp/mega-app prod 9999

revel build [import_path] [target_path] [run_mode]

  • Build the Revel web application named by the given import path.
  • This allows it to be deployed and run on a machine that lacks a Go installation.
  1. revel build github.org/mememe/mega-app /path/to/deploy/mega-app prod

WARNING: The target path will be completely deleted, if it already exists!

revel package [import_path] [run_mode]

  • Build the Revel web application named by the given import path.
  • This allows it to be deployed and run on a machine that lacks a Go installation.
  1. revel package github.com/revel/revel/examples/chat prod
  2. > Your archive is ready: chat.tar.gz

WARNING: The target path will be completely deleted, if it already exists!

revel clean [import_path]

  • Clean the Revel web application named by the given import path
  • Deletes the app/tmp directory.
  • Deletes the app/routes directory.
  1. revel clean github.com/revel/examples/booking

revel test [import_path] [run_mode] [suite.method]

  • Run all tests for the Revel app named by the given import path.
  1. revel test github.com/revel/examples/booking dev

原文: https://revel.github.io/manual/tool.html