graph-common
Version:
Open Graph API core js lib
185 lines (126 loc) • 7.93 kB
HTML
<html>
<head>
<title>bootstrap.litcoffee</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="bootstrap.html">
bootstrap.litcoffee
</a>
<a class="source" href="configuration_manager.html">
configuration_manager.litcoffee
</a>
<a class="source" href="echo_router.html">
echo_router.litcoffee
</a>
<a class="source" href="gql.html">
gql.litcoffee
</a>
<a class="source" href="graph.html">
graph.litcoffee
</a>
<a class="source" href="index.html">
index.litcoffee
</a>
<a class="source" href="mongodb_storage.html">
mongodb_storage.litcoffee
</a>
<a class="source" href="node_manager.html">
node_manager.litcoffee
</a>
<a class="source" href="node_schema.html">
node_schema.litcoffee
</a>
<a class="source" href="query.html">
query.litcoffee
</a>
<a class="source" href="redirect_router.html">
redirect_router.litcoffee
</a>
<a class="source" href="router_manager.html">
router_manager.litcoffee
</a>
<a class="source" href="router_schema.html">
router_schema.litcoffee
</a>
<a class="source" href="schema_manager.html">
schema_manager.litcoffee
</a>
<a class="source" href="schema_schema.html">
schema_schema.litcoffee
</a>
<a class="source" href="static_router.html">
static_router.litcoffee
</a>
<a class="source" href="storage_manager.html">
storage_manager.litcoffee
</a>
<a class="source" href="storage_router.html">
storage_router.litcoffee
</a>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>bootstrap.litcoffee</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">¶</a>
</div>
<p>Bootstrap Graph API</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Bootstrap</span></span>
<span class="hljs-property">@bootstrap</span>: <span class="hljs-function"><span class="hljs-params">(graph)</span> -></span>
graph.create_router { <span class="hljs-attribute">name</span>: <span class="hljs-string">"EchoRouter"</span>, <span class="hljs-attribute">require</span>: <span class="hljs-string">"./echo_router"</span> }
graph.create_router { <span class="hljs-attribute">name</span>: <span class="hljs-string">"RedirectRouter"</span>, <span class="hljs-attribute">require</span>: <span class="hljs-string">"./redirect_router"</span> }
graph.create_router { <span class="hljs-attribute">name</span>: <span class="hljs-string">"StaticRouter"</span>, <span class="hljs-attribute">require</span>: <span class="hljs-string">"./static_router"</span> }
graph.create_router { <span class="hljs-attribute">name</span>: <span class="hljs-string">"StorageRouter"</span>, <span class="hljs-attribute">require</span>: <span class="hljs-string">"./storage_router"</span> }
graph.create_router { <span class="hljs-attribute">name</span>: <span class="hljs-string">"ChainRouter"</span>, <span class="hljs-attribute">require</span>: <span class="hljs-string">"./chain_router"</span> }
graph.create_node {
<span class="hljs-attribute">name</span>: <span class="hljs-string">"root"</span>,
<span class="hljs-attribute">path</span>: <span class="hljs-string">""</span>,
<span class="hljs-attribute">routers</span>: {
<span class="hljs-attribute">StaticRouter</span>: <span class="hljs-string">"Piráti Open Graph API"</span>
}
}
graph.create_node { <span class="hljs-attribute">name</span>: <span class="hljs-string">"echo"</span>, <span class="hljs-attribute">path</span>: <span class="hljs-string">"echo"</span>, <span class="hljs-attribute">routers</span>: { <span class="hljs-attribute">EchoRouter</span>: <span class="hljs-literal">true</span> } }
graph.create_node {
<span class="hljs-attribute">name</span>: <span class="hljs-string">"redirect"</span>,
<span class="hljs-attribute">path</span>: <span class="hljs-string">"echo/redirect"</span>,
<span class="hljs-attribute">routers</span>: {
<span class="hljs-attribute">RedirectRouter</span>: <span class="hljs-string">"echo"</span>
}
}
graph.create_node { <span class="hljs-attribute">name</span>: <span class="hljs-string">"schema"</span>, <span class="hljs-attribute">path</span>: <span class="hljs-string">"schema"</span>, <span class="hljs-attribute">routers</span>: { <span class="hljs-attribute">StorageRouter</span>: <span class="hljs-string">"Schema"</span> } }
graph.create_node { <span class="hljs-attribute">name</span>: <span class="hljs-string">"router"</span>, <span class="hljs-attribute">path</span>: <span class="hljs-string">"router"</span>, <span class="hljs-attribute">routers</span>: { <span class="hljs-attribute">StorageRouter</span>: <span class="hljs-string">"Router"</span> } }
graph.create_node { <span class="hljs-attribute">name</span>: <span class="hljs-string">"node"</span>, <span class="hljs-attribute">path</span>: <span class="hljs-string">"node"</span>, <span class="hljs-attribute">routers</span>: { <span class="hljs-attribute">StorageRouter</span>: <span class="hljs-string">"Node"</span> } }
graph.create_node {
<span class="hljs-attribute">name</span>: <span class="hljs-string">"chain"</span>,
<span class="hljs-attribute">path</span>: <span class="hljs-string">"chain"</span>,
<span class="hljs-attribute">routers</span>: {
<span class="hljs-attribute">StaticRouter</span>: <span class="hljs-string">"Chained echo"</span>,
<span class="hljs-attribute">RedirectRouter</span>: <span class="hljs-string">"echo/redirect"</span>
}
}
<span class="hljs-built_in">module</span>.<span class="hljs-built_in">exports</span> = Bootstrap</pre></div></div>
</li>
</ul>
</div>
</body>
</html>