angoose
Version:
Angoose is a Remote Method Invocation module that comes with built-in mongoose/angular support. Now you can call server side module in browser just like you're in the server side!
109 lines (76 loc) • 3.18 kB
HTML
<html>
<head>
<title>AngooseContext.js</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To …</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page">
<a class="source" href="AngooseContext.html">
AngooseContext.js
</a>
<a class="source" href="Principal.html">
Principal.js
</a>
<a class="source" href="Remotable.html">
Remotable.js
</a>
<a class="source" href="angoose.html">
angoose.js
</a>
<a class="source" href="models.html">
models.js
</a>
<a class="source" href="schemas.html">
schemas.js
</a>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>AngooseContext.js</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">¶</a>
</div>
</div>
<div class="content"><div class='highlight'><pre><span class="keyword">var</span> logger = require(<span class="string">"log4js"</span>).getLogger(<span class="string">"angoose"</span>);</pre></div></div>
</li>
<li id="section-2">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-2">¶</a>
</div>
<h1 id="remotable">Remotable</h1>
<p>This is the base class for Angoose model classes and service classes</p>
<p><strong>getContext()</strong></p>
<p>This method allows you obtain the execution context.
The context may contain following properties:</p>
<pre><code>{
user: currently logged in user, see Principal
req: current request object, this may be undefined
} </code></pre>
</div>
<div class="content"><div class='highlight'><pre><span class="function"><span class="keyword">function</span><span class="params">(req)</span>{</span>
<span class="keyword">this</span>.req = req;
}
module.exports = Remotable</pre></div></div>
</li>
</ul>
</div>
</body>
</html>