Permalink
Browse files

some more sugar for README file

  • Loading branch information...
1 parent bf1b866 commit c81c2e6c0b97fbd84c388e258c23e25b20cb3253 @kadirpekel committed May 16, 2011
Showing with 22 additions and 10 deletions.
  1. +22 −10 README.md
View
@@ -4,6 +4,13 @@ Meryl
Meryl is a minimalist web framework for nodejs platform.
It is really simple to use, fun to play and easy to modify.
+It consists of only ~240 source lines of code. Here is the proof.
+
+```
+$ uglifyjs -b -nm --no-seqs -ns -nc meryl.js | wc -l
+ 233
+```
+
Install
-------
@@ -45,9 +52,6 @@ meryl.run();
Meryl is Connect middleware compatible. Serve static content in seconds.
``` javascript
-var connect = require('connect'),
- meryl = require('meryl');
-
meryl
.plug('GET *',
connect.favicon(),
@@ -62,9 +66,8 @@ meryl
Love (fab)? Checkout (fab) flavored meryl.
``` javascript
-with (require('connect')) {
-
- require('meryl')
+with (connect) {
+ meryl
.fabby
(logger(), static("."))
('GET /', function (req, resp) {
@@ -80,19 +83,16 @@ with (require('connect')) {
}
)
();
-
}
```
Also taste meryl with coffeescript, using coffeekup
``` coffeescript
-coffeekup = require 'coffeekup'
-connect = require 'connect'
people = ['animal', 'beakers', 'piggy', 'kermit']
-(require 'meryl')
+meryl
.plug connect.logger(),
connect.static(".")
@@ -117,6 +117,18 @@ people = ['animal', 'beakers', 'piggy', 'kermit']
templateFunc: coffeekup.adapters.meryl
```
+You can of course use its cgi interface.
+
+``` javascript
+require('http').createServer(
+ meryl
+ .get('/', function (req, resp) {
+ resp.end("<h1>Demonstraing Meryl</h1>");
+ })
+ .cgi()
+).listen(3000);
+```
+
Meryl has much more, please continue from the links below.
Please visit wiki page for documentation:

0 comments on commit c81c2e6

Please sign in to comment.