Permalink
Browse files

added 'standalone' example and made some minor changes

  • Loading branch information...
1 parent 2bacaee commit 914884563e73effd76ab5f8012d7f30da63ce47d @kadirpekel committed Oct 19, 2010
@@ -0,0 +1,8 @@
+Simply type 'meryl' in the current working directory
+
+ $ meryl
+
+or execute file 'run'
+
+ $ ./run
+
@@ -0,0 +1,6 @@
+// export Meryl options
+module.exports = {
+ templateExt: '.mt', // Default is '.jshtml'
+ port: 8000
+}
+
@@ -0,0 +1,3 @@
+<h1>Wow, this page rendered automatically</h1>
+<p><a href="/subpage">Go to subpage</a></p>
+
View
@@ -0,0 +1,2 @@
+#! /usr/bin/env meryl
+
@@ -0,0 +1,2 @@
+<h1>I can also access request and response objects</h1>
+<h2>Hello, <%= request.params.name || ' World!' %></h2>
View
@@ -16,6 +16,8 @@ var meryl = require('./meryl'),
var options = null;
+// TODO: Handle config file location as a cli arg to load from an arbitrary path
+
try {
options = require(path.join(process.cwd(), "config"));
if (options)

0 comments on commit 9148845

Please sign in to comment.