Helmet
Simple web framework for Goliath web server.
Helmet is very inspired on Sinatra framework (https://github.com/bmizerany/sinatra) without losing the Goliath API design. The framework tries some functionalities that Goliath doesn't provide out of the box, like:
- Session management
- Simplified template support
- Simple notation for HTTP verbs and filters
This is the very first version, all the APIand code will be reviewed.
Example
require 'helmet'
class Misc < Helmet::API
use Rack::Static,
:root => public_folder, # Default: ./public
:urls => ['/css']
get '/' do
erb(:index, {:layout => :layout}, {:data => session[:data]})
end
post '/session' do |env|
erb(:index, {:layout => :layout}, {:data => session[:data]})
end
end
See examples directory
License
Goliath License, (https://github.com/postrank-labs/goliath/blob/master/LICENSE)
Credits
Helmet is copyright Thiago Lewin