Revel Command-line tool compilation using

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

On an article, briefly introduced the next Revel, this one we look at Github.com/robfig/revel/cmd this command line tool.
Document: Http://robfig.github.com/revel/manual/tool.html
First, compile the Revel command-line tool, as follows:

Go build-o bin/revel github.com/robfig/revel/cmd

Then run the help as follows:

yourihua@ubuntu:~/workplace/rhino/bin$ 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 a Revel application (e.g. for deployment)
Test run all tests from the command-line

Use ' Revel Help [command] ' for more information.
yourihua@ubuntu:~/workplace/rhino/bin$

From the help you can know about the use of these simple commands such as Run,new,clean, and more detailed introductions can be obtained using: Revel Helper [command].
As follows:

yourihua@ubuntu:~/workplace/rhino/bin$ Revel Help New
~
~ revel! Http://robfig.github.com/revel
~
Usage:revel new [path]

New creates a few files to get a new Revel application running quickly.

It puts all of the files on the given import path, taking the final element in
The path to is the app name.

For example:

Revel New Import/path/helloworld

yourihua@ubuntu:~/workplace/rhino/bin$ Revel Help Clean
~
~ revel! Http://robfig.github.com/revel
~
Usage:revel clean [Import path]

The Revel Web application named by the given import path.

For example:

Revel Clean Github.com/robfig/revel/samples/chat

It removes the app/tmp directory.

yourihua@ubuntu:~/workplace/rhino/bin$ Revel Help Package
~
~ revel! Http://robfig.github.com/revel
~
Usage:revel package [Import path]

The Revel Web application named by the given import path.
This allows is deployed and run on a machine, that lacks a Go installation.

For example:

Revel Package Github.com/robfig/revel/samples/chat

yourihua@ubuntu:~/workplace/rhino/bin$ Revel Help Test
~
~ revel! Http://robfig.github.com/revel
~
Usage:revel test [Import path] [run mode]

Run all tests to the Revel app named by the given import path.

For example, to run the booking sample application ' s tests:

Revel Test Github.com/robfig/revel/samples/booking Dev

The run mode is used to select which set of app.conf configuration should
Apply and May is used to determine logic in the application itself.

Run mode defaults to "Dev".
yourihua@ubuntu:~/workplace/rhino/bin$

This command-line tool has fewer code, as follows:

Next, we'll learn more about this tool from the code.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.