Skip to content

Commit

Permalink
Getting routing wired in with an external routes.js to be overridde…
Browse files Browse the repository at this point in the history
…n by configuration

Removing unwanted logging
  • Loading branch information
avoidwork committed Aug 2, 2014
1 parent d0f2e0d commit 8b15cad
Show file tree
Hide file tree
Showing 15 changed files with 508 additions and 22 deletions.
2 changes: 2 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ module.exports = function (grunt) {
"src/intro.js",
"src/constructor.js",
"src/bootstrap.js",
"src/error.js",
"src/factory.js",
"src/prepare.js",
"src/outro.js"
],
dest : "lib/<%= pkg.name %>.js"
Expand Down
1 change: 1 addition & 0 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"hostname": "localhost",
"pageSize": 5,
"port": 8000,
"routes": "routes.js",
"log": {
"dtrace": false,
"syslog": false
Expand Down
293 changes: 290 additions & 3 deletions doc/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,18 @@
<a href="global.html#bootstrap">bootstrap</a>
</li>

<li>
<a href="global.html#error">error</a>
</li>

<li>
<a href="global.html#factory">factory</a>
</li>

<li>
<a href="global.html#prepare">prepare</a>
</li>


</ul>
</li>
Expand Down Expand Up @@ -249,7 +257,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="tenso.js.html">tenso.js</a>, <a href="tenso.js.html#sunlight-1-line-28">line 28</a>
<a href="tenso.js.html">tenso.js</a>, <a href="tenso.js.html#sunlight-1-line-31">line 31</a>
</li></ul></dd>


Expand Down Expand Up @@ -295,6 +303,98 @@ <h5>Returns:</h5>



</dd>



<dt>
<h4 class="name" id="error"><span class="type-signature"></span>error<span class="signature">()</span><span class="type-signature"> &rarr; {Undefined}</span></h4>


</dt>
<dd>


<div class="description">
<p>Route error handler</p>
</div>









<dl class="details">



















<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="tenso.js.html">tenso.js</a>, <a href="tenso.js.html#sunlight-1-line-67">line 67</a>
</li></ul></dd>







</dl>











<h5>Returns:</h5>


<div class="param-desc">
<p>undefined</p>
</div>



<dl>
<dt>
Type
</dt>
<dd>

<span class="param-type">Undefined</span>


</dd>
</dl>





</dd>


Expand Down Expand Up @@ -341,7 +441,7 @@ <h4 class="name" id="factory"><span class="type-signature"></span>factory<span c

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="tenso.js.html">tenso.js</a>, <a href="tenso.js.html#sunlight-1-line-45">line 45</a>
<a href="tenso.js.html">tenso.js</a>, <a href="tenso.js.html#sunlight-1-line-77">line 77</a>
</li></ul></dd>


Expand Down Expand Up @@ -387,6 +487,193 @@ <h5>Returns:</h5>



</dd>



<dt>
<h4 class="name" id="prepare"><span class="type-signature"></span>prepare<span class="signature">(data, error, status)</span><span class="type-signature"> &rarr; {Object}</span></h4>


</dt>
<dd>


<div class="description">
<p>Prepares a response body</p>
</div>







<h5>Parameters:</h5>


<table class="params table table-striped">
<thead>
<tr>

<th>Name</th>


<th>Type</th>





<th class="last">Description</th>
</tr>
</thead>

<tbody>


<tr>

<td class="name"><code>data</code></td>


<td class="type">


<span class="param-type">Mixed</span>



</td>





<td class="description last"><p>[Optional] Response body &quot;data&quot;</p></td>
</tr>



<tr>

<td class="name"><code>error</code></td>


<td class="type">


<span class="param-type">Object</span>



</td>





<td class="description last"><p>[Optional] Error instance</p></td>
</tr>



<tr>

<td class="name"><code>status</code></td>


<td class="type">


<span class="param-type">Number</span>



</td>





<td class="description last"><p>HTTP status code</p></td>
</tr>


</tbody>
</table>




<dl class="details">



















<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="tenso.js.html">tenso.js</a>, <a href="tenso.js.html#sunlight-1-line-104">line 104</a>
</li></ul></dd>







</dl>











<h5>Returns:</h5>


<div class="param-desc">
<p>Standardized response body</p>
</div>



<dl>
<dt>
Type
</dt>
<dd>

<span class="param-type">Object</span>


</dd>
</dl>





</dd>

</dl>
Expand Down Expand Up @@ -415,7 +702,7 @@ <h5>Returns:</h5>

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a>
on Fri Aug 01 2014 22:52:20 GMT-0400 (EDT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Fri Aug 01 2014 23:32:19 GMT-0400 (EDT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
Expand Down
10 changes: 9 additions & 1 deletion doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,18 @@
<a href="global.html#bootstrap">bootstrap</a>
</li>

<li>
<a href="global.html#error">error</a>
</li>

<li>
<a href="global.html#factory">factory</a>
</li>

<li>
<a href="global.html#prepare">prepare</a>
</li>


</ul>
</li>
Expand Down Expand Up @@ -115,7 +123,7 @@

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a>
on Fri Aug 01 2014 22:52:20 GMT-0400 (EDT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Fri Aug 01 2014 23:32:19 GMT-0400 (EDT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
Expand Down
Loading

0 comments on commit 8b15cad

Please sign in to comment.