README.md in macaw_framework-0.1.4 vs README.md in macaw_framework-0.1.5
- old
+ new
@@ -1,7 +1,9 @@
# MacawFramework
+<img src="macaw_logo.png" alt= “” style="width: 30%;height: 30%;margin-left: 35%">
+
This is a framework for developing web applications. Please have in mind that this is still a work in progress and
it is strongly advised to not use it for production purposes for now. Actualy it supports only HTTP. HTTPS and SSL
support will be implemented soon. Anyone who wishes to contribute is welcome.
## Installation
@@ -24,11 +26,12 @@
```json
{
"macaw": {
"port": 8080,
- "bind": "localhost"
+ "bind": "localhost",
+ "threads": 10
}
}
```
Example of usage:
@@ -37,10 +40,13 @@
require 'macaw_framework'
require 'json'
m = MacawFramework::Macaw.new
-m.get('/hello_world') do |headers, body, parameters|
+m.get('/hello_world') do |context|
+ context[:body] # Returns the request body as string
+ context[:params] # Returns query parameters and path variables as a hash
+ context[:headers] # Returns headers as a hash
return JSON.pretty_generate({ hello_message: 'Hello World!' }), 200
end
m.start!
```