https://github.com/tlewin/helmet
Simple Ruby non-blocking web framework for Goliath web server.
https://github.com/tlewin/helmet
Last synced: about 1 year ago
JSON representation
Simple Ruby non-blocking web framework for Goliath web server.
- Host: GitHub
- URL: https://github.com/tlewin/helmet
- Owner: tlewin
- License: other
- Created: 2012-09-14T15:17:23.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-10-14T17:07:58.000Z (over 12 years ago)
- Last Synced: 2025-04-17T17:17:45.760Z (about 1 year ago)
- Language: Ruby
- Homepage:
- Size: 233 KB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- License: LICENSE
Awesome Lists containing this project
README
# Helmet
Helmet is a non-blocking (asynchronous) web framework built on top of [Goliath Web Server](https://github.com/postrank-labs/goliath/).
The Helmet semantics is inspired on [Sinatra framework](http://www.sinatrarb.com/) and brings to Goliath some nice features:
- HTTP Route processing, using the kick-ass [http_router gem](https://github.com/joshbuddy/http_router).
- Simplified template support, using the [tilt gem](https://github.com/rtomayko/tilt).
- Helpers support.
## Example
Create hello.rb:
```ruby
require 'helmet'
class Hello < Helmet::API
helpers do
def say_hello name
"Hello #{name}!!!"
end
end
get '/:name' do
say_hello params[:name]
end
end
```
Run it from command line:
ruby hello.rb
For more information, see `/examples` directory.
## Instalation
Install from rubygem repository:
gem install helmet
Install from source:
rake gem
## License
Helmet is released under MIT license. Please, take a look at LICENSE file.