Skip to content

Guide · Open source

How to use Revel: install, create and run a Go web app

Updated · written with AI from the project's own documentation and checked against our catalogue data

Revel is an open-source, full-stack web framework for the Go programming language. It gives you a standard project structure and built-in pieces so you do not have to assemble routing and request handling from scratch. This guide shows you how to install the Revel command-line tool, create a new app, and run it locally.

Revelrevel/revel · ★ 13.2k · MIT

Quick start

  1. 1Install Go. Make sure Go is installed on your machine before you install Revel.
  2. 2Install the Revel tool. Run the go install command for github.com/revel/cmd/revel@latest to get the revel command-line tool.
  3. 3Create a new app. Run revel new with the -a flag for your app name and the -r flag to run it.
  4. 4Open the app in a browser. Visit http://localhost:9000 and check that you see "It works!".
  5. 5Read the manual. Use the manual and samples on revel.github.io to learn routing and project structure.

What is Revel and who is it for?

Revel is a web framework for Go. A framework provides a standard structure and built-in components, so you start from a conventional layout instead of building that structure yourself. The project describes itself as focused on high productivity and full-stack web development.

It suits Go developers who want a batteries-included framework, and teams starting a new web application in Go who prefer a conventional layout. It is not a good first project for people new to programming, because you need working knowledge of Go first.

Install Revel on your machine

You need Go installed first. The README does not specify which Go version is required. Install the Revel command-line tool with the go install command below. The README notes that the project supports go.mod package management.

  • Prerequisite: Go (the README does not state a required version)
  • Install tool: the revel command-line tool from the github.com/revel/cmd/revel package
go install github.com/revel/cmd/revel@latest

Create and run your first Revel app

Use the revel command to generate a new app. The README's quick start uses the -a flag to set the app name and the -r flag to run it. Once it is running, open http://localhost:9000 in your browser. You should see the text "It works!".

  • Replace my-app with the name you want for your project
  • Visit http://localhost:9000 after the app starts
revel new -a my-app -r

Where to find help and documentation

The README points to a manual, samples, and Godocs on the project homepage. There are also community channels on Gitter and a StackOverflow tag for revel questions, plus a wiki page listing apps built with Revel and articles that feature it.

  • Manual, samples and Godocs: revel.github.io
  • Community chat: Gitter
  • Questions: StackOverflow tag revel
  • Apps and articles: the project wiki

What people use it for

  • Building a full-stack web application in Go with a conventional project layout
  • Starting a new Go web project quickly with a command that generates the app structure
  • Teams that want one framework covering web development rather than assembling separate libraries

Frequently asked questions

How do I install Revel?

Install Go first, then run go install github.com/revel/cmd/revel@latest to get the revel command-line tool. The README's quick start shows this as the install step.

What are the requirements for Revel?

You need Go installed. The README does not state which Go version Revel requires, so check the project's documentation before you start. You should also have working knowledge of Go.

Is Revel free to use?

Revel is released under the MIT licence, as shown in the project's repository badge. Check the LICENSE file in the repository for the full terms.

How do I create a new Revel app?

Run revel new -a my-app -r, replacing my-app with your project name. The -r flag runs the app, and you can then open http://localhost:9000 in your browser.

What are alternatives to Revel?

Projects often compared with Revel include Gin, Echo, Beego and Fiber. Revel is a larger full-stack framework, so if you only need a minimal, lightweight router, one of the smaller options may suit you better.

Why does my app not show It works at localhost:9000?

The README says that after running the quick start command you should see "It works!" at http://localhost:9000. If you do not, check that the app started without errors and that nothing else is using port 9000. The README does not list other troubleshooting steps, so the community channels are the next place to look.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Revel suits Go developers who want a batteries-included, full-stack framework with a built-in tool to create and run projects. It is a poor fit for people new to programming, or for teams that only want a minimal router, since it is a larger framework that assumes working knowledge of Go.

Install options & downloads