Questions tagged [revel]

A high-productivity web framework for the Go language.

Features

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.

Comprehensive

Revel provides routing, parameter parsing, validation, session/flash, templating, caching, job running, a testing framework, and even internationalization.

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.

Framework Design

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.

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).

Source: project home page

206 questions
2
votes
1 answer

How to get dynamic app conf in golang revel

I have project that use golang-revel and in my project, i need to connect to 2 databases. Currently, i can migrate the database one by one, but if this project is getting bigger i need to be able to migrate all databases. Is there any way that i can…
Michael Halim
  • 262
  • 2
  • 20
2
votes
1 answer

Revel and Docker container

I am attempting to create a docker container that contains the revel skeleton app. Everything seems to build OK and the container is created but when I go to localhost:9000 in my browser nothing comes up. To make sure my environment is working…
Tom Vaughan
  • 390
  • 2
  • 16
2
votes
2 answers

Revel Dependency Injection

I'm looking to have my revel controllers use various services, which I mock out for unit tests. I'm new to Go; in C# I'd inject them using dependency injection. Is there a common way to do this in revel? It seems like the best way I've found is to…
Stuart Moore
  • 681
  • 5
  • 32
2
votes
1 answer

Cannot install revel framework form Go

I tried to install Revel Framework. I followed all the steps as given in the documentation but whenever I tried to run the Revel command it throws panic error. Following are the steps which I am performing Enviormental path: export…
Amit Sharma
  • 2,297
  • 3
  • 19
  • 25
2
votes
1 answer

How to query a GORM Model

I'm attempting to query a database given a model, and I'm getting a blank model as a response. I'm using Revel framework and GORM to create the model and query the database. app.go package controllers import ( "github.com/revel/revel" …
user1890328
  • 1,222
  • 1
  • 13
  • 21
2
votes
2 answers

Golang Revel Assertf causes panic

I have created revel test suite, I use Assertf for checking an error. t.Assertf(err == nil, "error occurred: %v", err) It worked without any problem in my Windows and also Mac OSX. But in my remote server, Ubuntu 16.04, whenever assert error, I got…
Chanyut
  • 43
  • 5
2
votes
1 answer

I cannot get posted body in revel go framework

I am trying to implement a basic CRUD using the Rest architecture in revel, but I am not able to send the data encoded in json format to an endpoint, I was try multiple ways to check the body content in the request, so now I have a "minimal…
2
votes
1 answer

Parsing a json datetime in revel

I'm attempting to parse a Datetime in revel from a json request. The request looks something like this: { "startedAt": "2017-06-01 10:39", ... } The struct it's being decoded into looks like this: type MyStruct struct { StartedAt time.Time…
Camway
  • 1,010
  • 14
  • 23
2
votes
3 answers

Error: "invalid type for comparison" in revel template

After creating multple endpoints customizing footer.html, I end up with this error for not apparent this don't effect the functionally of the application, just annoying me. Tried: revel run revel_app or dev Revel Template Execution Error :…
farhan
  • 458
  • 2
  • 8
  • 24
2
votes
3 answers

undefined: revel.LoadConfig on revel app start

I was following this tutorial on using Go + Revel + MongoDB. But as I starting the application, I got this error: The Go code api-go/app/init.go does not compile: undefined: revel.LoadConfig along with other errors as I look in the terminal. ERROR…
Oscar Yuandinata
  • 1,025
  • 1
  • 13
  • 31
2
votes
1 answer

Revel+mgo golang - How to define a struct type to handle nested objects coming from the db?

I have this kind of documents in my mongo collection - { "_id" : "3wPEpWwECbrTrnSbh", "brandId" : 45, "title" : "brandtitle", "logoImg" : "brandtitle.png", "category" : { "category 1" : [ { …
Gaurav Ojha
  • 1,147
  • 1
  • 15
  • 37
2
votes
0 answers

Pass current route to template

I've been playing around with golang for a couple of weeks now, and recently started to look into the revel framework. In other languages/frameworks that I've used, it's always been possible to check what the current route is from within the…
Elias Van Ootegem
  • 74,482
  • 9
  • 111
  • 149
2
votes
1 answer

Inherit Controller From Module in Revel Framework

I am trying to use a shared controller from a module in my app, but I'm not really sure how to do it. Here's what I want to do: I have two revel apps, a frontend and backend app. The frontend app is used to show the user-facing site, and the…
bertzzie
  • 3,558
  • 5
  • 30
  • 41
2
votes
2 answers

How to use session with golang revel framework

I use the golang web framework as my web framework. But the session doesn`t use. the code I write as follow : package controllers import ( "fmt" "net/http" "strconv" "GoRBAC/app/base" "GoRBAC/app/models" r…
sope
  • 1,619
  • 5
  • 19
  • 37
2
votes
1 answer

Caching database results in Golang (revel)

I am currently coding a web application in Go with the help of the revel web framework. I've come to the point where I want to serve results from a database, however there's quite an amount of rows to serve (~5000-10000). The information only…
NLScotty
  • 96
  • 1
  • 9
1 2
3
13 14