Revel

A high-productivity web framework for the Go language.
Latest Release:
v0.19.0 on 2018-02-06
Go: v1.6+ required


Hot Code Reload

Edit, save, and refresh. Revel compiles your code and templates for you, so you don't miss a beat. Code doesn't compile? It gives you a helpful description. Run-time code panic? Revel has you covered.

High Performance

Revel builds on top of the Go HTTP server, which was recently benchmarked to serve three to ten times as many requests as Rails across a variety of loads.



Synchronous

The Go HTTP server runs each request in its own goroutine. Write simple callback-free code without guilt.



Stateless

Revel provides primitives that keep the web tier stateless for predictable scaling. For example, session data is stored in the user cookie, and the cache is backed by a memcached cluster, redis or in-memory.

Modular

Revel is built around composable middleware called filters, which implement nearly all request-processing functionality. Developers have the freedom to replace the default filters with custom implementations (e.g. a custom router).


Quick Start

Revel has some sample applications to demonstrate typical usage.

The commands at right will:

  • Install Revel into your GOPATH
  • Install and Build the Revel command-line tool
  • Install the sample applications
  • Run the Chat sample application
  • Open http://localhost:9000/

Read how the chat demo is implemented.

# get 'revel' framework and command
go get github.com/revel/cmd/revel

# Get the example apps
git clone https://github.com/revel/examples \
$GOPATH/src/github.com/revel/examples

# revel the chat app
revel run github.com/revel/examples/chat
# create a new app and run
revel new github.com/myaccount/my-app

Routing
A simple declarative routing syntax. Type-safe reverse routing.
Controllers
Revel organizes endpoints into Controllers. They provide easy data binding and form validation.
Templates
Revel makes Go Templates simple to use at scale.
Interceptors
Register functionality to be called before or after actions. They can be activated per Controller.
Filters
More general functionality can be implemented with Filters.