UNPKG

sgapps-server

Version:
3,022 lines (758 loc) โ€ข 86.8 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>SGAppsServer - SGApps Server - Framework</title> <meta name="description" content="SGApps Server for high performance results" /> <meta name="keywords" content="javascript, js, application-prototype, prototype" /> <meta name="keyword" content="javascript, js, application-prototype, prototype" /> <meta property="og:title" content="SGApps Server - Framework"/> <meta property="og:type" content="website"/> <meta property="og:image" content=""/> <meta property="og:url" content="https://labs.sgapps.io/open-source/sgapps-server"/> <script src="scripts/prettify/prettify.js"></script> <script src="scripts/prettify/lang-css.js"></script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> <script src="scripts/nav.js" defer></script> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <input type="checkbox" id="nav-trigger" class="nav-trigger" /> <label for="nav-trigger" class="navicon-button x"> <div class="navicon"></div> </label> <label for="nav-trigger" class="overlay"></label> <nav class="wrap"> <input type="text" id="nav-search" placeholder="Search" /> <h2><a href="index.html">Home</a></h2><h2><a href="https://labs.sgapps.io/open-source/sgapps-server" target="_blank" class="menu-item" id="website_link" >Project Page ( Git Lab )</a></h2><h2><a href="http://gordienco.net/" target="_blank" class="menu-item" id="website_link" >About Me</a></h2><h2><a href="https://labs.sgapps.io/open-source/sgapps-server" target="_blank" class="menu-item" id="github_link" >GitHub</a></h2><h3>Classes</h3><ul><li><a href="AccessLogger.html">AccessLogger</a><ul class='methods'><li data-type='method' style='display: none;'><a href="AccessLogger.html#formattedDate">formattedDate</a></li><li data-type='method' style='display: none;'><a href="AccessLogger.html#getProtocol">getProtocol</a></li><li data-type='method' style='display: none;'><a href="AccessLogger.html#getReferer">getReferer</a></li><li data-type='method' style='display: none;'><a href="AccessLogger.html#getRemoteIp">getRemoteIp</a></li><li data-type='method' style='display: none;'><a href="AccessLogger.html#getSize">getSize</a></li><li data-type='method' style='display: none;'><a href="AccessLogger.html#getUsername">getUsername</a></li><li data-type='method' style='display: none;'><a href="AccessLogger.html#logRequest">logRequest</a></li></ul></li><li><a href="FaceboxTemplate.html">FaceboxTemplate</a><ul class='methods'><li data-type='method' style='display: none;'><a href="FaceboxTemplate.html#render">render</a></li><li data-type='method' style='display: none;'><a href="FaceboxTemplate.html#renderCode">renderCode</a></li><li data-type='method' style='display: none;'><a href="FaceboxTemplate.html#renderFile">renderFile</a></li></ul></li><li><a href="FSLibrary.html">FSLibrary</a></li><li><a href="LoggerBuilder.html">LoggerBuilder</a><ul class='methods'><li data-type='method' style='display: none;'><a href="LoggerBuilder.html#decorateGlobalLogger">decorateGlobalLogger</a></li><li data-type='method' style='display: none;'><a href="LoggerBuilder.html#error">error</a></li><li data-type='method' style='display: none;'><a href="LoggerBuilder.html#info">info</a></li><li data-type='method' style='display: none;'><a href="LoggerBuilder.html#log">log</a></li><li data-type='method' style='display: none;'><a href="LoggerBuilder.html#prettyCli">prettyCli</a></li><li data-type='method' style='display: none;'><a href="LoggerBuilder.html#prompt">prompt</a></li><li data-type='method' style='display: none;'><a href="LoggerBuilder.html#warn">warn</a></li></ul></li><li><a href="SGAppsServer.html">SGAppsServer</a><ul class='methods'><li data-type='method' style='display: none;'><a href="SGAppsServer.html#all">all</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#connect">connect</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#delete">delete</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#Email">Email</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#finalHandler">finalHandler</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#get">get</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#handle">handle</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#handleErrorRequest">handleErrorRequest</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#handlePostData">handlePostData</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#handleRequest">handleRequest</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#handleStaticRequest">handleStaticRequest</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#head">head</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#options">options</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#patch">patch</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#post">post</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#put">put</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#server">server</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#trace">trace</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#use">use</a></li></ul></li><li><a href="SGAppsServer.NodeJsMvc.html">NodeJsMvc</a></li><li class="level-hide"><a href="SGAppsServer.NodeJsMvc.Controller.html">Controller</a><ul class='methods'><li data-type='method' style='display: none;'><a href="SGAppsServer.NodeJsMvc.Controller.html#actionExists">actionExists</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.NodeJsMvc.Controller.html#addAction">addAction</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.NodeJsMvc.Controller.html#addView">addView</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.NodeJsMvc.Controller.html#getAction">getAction</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.NodeJsMvc.Controller.html#getView">getView</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.NodeJsMvc.Controller.html#removeAction">removeAction</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.NodeJsMvc.Controller.html#removeView">removeView</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.NodeJsMvc.Controller.html#render">render</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.NodeJsMvc.Controller.html#viewExists">viewExists</a></li></ul></li><li class="level-hide"><a href="SGAppsServer.NodeJsMvc.Controller.Action.html">Action</a><ul class='methods'><li data-type='method' style='display: none;'><a href="SGAppsServer.NodeJsMvc.Controller.Action.html#run">run</a></li></ul></li><li><a href="SGAppsServerDecoratorsLibrary.html">SGAppsServerDecoratorsLibrary</a><ul class='methods'><li data-type='method' style='display: none;'><a href="SGAppsServerDecoratorsLibrary.html#.AccessLoggerDecorator">AccessLoggerDecorator</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerDecoratorsLibrary.html#.NodeJsMvcDecorator">NodeJsMvcDecorator</a></li></ul></li><li><a href="SGAppsServerDictionary.html">SGAppsServerDictionary</a><ul class='methods'><li data-type='method' style='display: none;'><a href="SGAppsServerDictionary.html#generatePathKey">generatePathKey</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerDictionary.html#push">push</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerDictionary.html#run">run</a></li></ul></li><li><a href="SGAppsServerEmail.html">SGAppsServerEmail</a><ul class='methods'><li data-type='method' style='display: none;'><a href="SGAppsServerEmail.html#.from">from</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerEmail.html#.isValidAddress">isValidAddress</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerEmail.html#.timeout">timeout</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerEmail.html#send">send</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerEmail.html#valid">valid</a></li></ul></li><li><a href="SGAppsServerRequest.html">SGAppsServerRequest</a><ul class='methods'><li data-type='method' style='display: none;'><a href="SGAppsServerRequest.html#_parseDeepFieldName">_parseDeepFieldName</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerRequest.html#getMountUpdatedUrl">getMountUpdatedUrl</a></li></ul></li><li><a href="SGAppsServerRequestCookie.html">SGAppsServerRequestCookie</a><ul class='methods'><li data-type='method' style='display: none;'><a href="SGAppsServerRequestCookie.html#get">get</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerRequestCookie.html#set">set</a></li></ul></li><li><a href="SGAppsServerRequestSession.html">SGAppsServerRequestSession</a><ul class='methods'><li data-type='method' style='display: none;'><a href="SGAppsServerRequestSession.html#destroy">destroy</a></li></ul></li><li><a href="SGAppsServerResponse.html">SGAppsServerResponse</a><ul class='methods'><li data-type='method' style='display: none;'><a href="SGAppsServerResponse.html#pipeFile">pipeFile</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerResponse.html#pipeFileStatic">pipeFileStatic</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerResponse.html#redirect">redirect</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerResponse.html#send">send</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerResponse.html#sendError">sendError</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerResponse.html#sendStatusCode">sendStatusCode</a></li></ul></li><li><a href="SGAppsServerShared.html">SGAppsServerShared</a></li><li><a href="SGAppsSessionManager.html">SGAppsSessionManager</a><ul class='methods'><li data-type='method' style='display: none;'><a href="SGAppsSessionManager.html#handleRequest">handleRequest</a></li><li data-type='method' style='display: none;'><a href="SGAppsSessionManager.html#removeExpiredSessions">removeExpiredSessions</a></li></ul></li><li><a href="TemplateManager.html">TemplateManager</a><ul class='methods'><li data-type='method' style='display: none;'><a href="TemplateManager.html#add">add</a></li><li data-type='method' style='display: none;'><a href="TemplateManager.html#addList">addList</a></li><li data-type='method' style='display: none;'><a href="TemplateManager.html#get">get</a></li><li data-type='method' style='display: none;'><a href="TemplateManager.html#remove">remove</a></li><li data-type='method' style='display: none;'><a href="TemplateManager.html#render">render</a></li><li data-type='method' style='display: none;'><a href="TemplateManager.html#templateExists">templateExists</a></li></ul></li><li><a href="TemplateManagerViewer.html">TemplateManagerViewer</a><ul class='methods'><li data-type='method' style='display: none;'><a href="TemplateManagerViewer.html#render">render</a></li><li data-type='method' style='display: none;'><a href="TemplateManagerViewer.html#renderCode">renderCode</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#LoggerBuilderPrompt">LoggerBuilderPrompt</a></li><li><a href="global.html#MountUpdatedURL">MountUpdatedURL</a></li><li><a href="global.html#RequestHandler">RequestHandler</a></li><li><a href="global.html#RequestPathStructure">RequestPathStructure</a></li><li><a href="global.html#RequestPathStructureMap">RequestPathStructureMap</a></li><li><a href="global.html#RequestSessionDecorator">RequestSessionDecorator</a></li><li><a href="global.html#ResourcesExtensions">ResourcesExtensions</a></li><li><a href="global.html#routeMatch">routeMatch</a></li><li><a href="global.html#SGAppsServerDecorator">SGAppsServerDecorator</a></li><li><a href="global.html#SGAppsServerDictionaryRunCallBack">SGAppsServerDictionaryRunCallBack</a></li><li><a href="global.html#SGAppsServerErrorCallBack">SGAppsServerErrorCallBack</a></li><li><a href="global.html#SGAppsServerErrorOnlyCallback">SGAppsServerErrorOnlyCallback</a></li><li><a href="global.html#SGAppsServerHandlerPostData">SGAppsServerHandlerPostData</a></li><li><a href="global.html#SGAppsServerOptions">SGAppsServerOptions</a></li><li><a href="global.html#SGAppsServerRequestFile">SGAppsServerRequestFile</a></li><li><a href="global.html#SGAppsServerRequestPostDataItem">SGAppsServerRequestPostDataItem</a></li><li><a href="global.html#SGAppsServerRequestSessionCache">SGAppsServerRequestSessionCache</a></li><li><a href="global.html#SGAppsSessionManagerOptions">SGAppsSessionManagerOptions</a></li><li><a href="global.html#TemplateManagerRenderOptions">TemplateManagerRenderOptions</a></li><li><a href="global.html#TemplateManagerTemplate">TemplateManagerTemplate</a></li></ul> </nav> <div id="main"> <h1 class="page-title">SGAppsServer</h1> <section> <header> <h2> SGAppsServer </h2> </header> <article> <div class="container-overview"> <h4 class="name" id="SGAppsServer"><span class="type-signature"></span>new SGAppsServer<span class="signature">(options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server.js.html">prototypes/server.js</a>, <a href="prototypes_server.js.html#line87">line 87</a> </li></ul></dd> </dl> <div class="description usertext"> <p>HTTP Server for high performance results</p> </div> <h5>Examples</h5> <pre class="prettyprint"><code>// ================================ // Start your ๐Ÿš€ Web-Server app // ================================ const { SGAppsServer } = require('@sgapps.io/server'); const app = new SGAppsServer(); app.get('/', function (req, res) { res.send('hello world') }) app.server().listen(8080, () => { app.logger.log('Server is running on port 8080'); })</code></pre> <pre class="prettyprint"><code>// ======================================== // Start your ๐Ÿš€ Web-Server app Extended // ======================================== const { SGAppsServer } = require('@sgapps.io/server'); const app = new SGAppsServer(); app.get('/', function (req, res) { res.send('hello world') }) app.whenReady.then(() => { app.SessionManager.cookie = 'ssid'; app.SessionManager.SESSION_LIFE = 120; // seconds app.server().listen(8080, () => { app.logger.log('Server is running on port 8080'); }) }, app.logger.error);</code></pre> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>options</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>server</code></td> <td class="type"> <span class="param-type">Server</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="default"> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>strictRouting</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="default"> <code>true</code> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>debug</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="default"> <code>true</code> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>_DEBUG_MAX_HANDLER_EXECUTION_TIME</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="default"> <code>500</code> </td> <td class="description last"><p>console shows an warn if handler is executed more than ( works in debug mode )</p></td> </tr> <tr> <td class="name"><code>_DEBUG_REQUEST_HANDLERS_STATS</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="default"> <code>false</code> </td> <td class="description last"><p>console shows an warn if handler is executed more than ( works in debug mode )</p></td> </tr> <tr> <td class="name"><code>_REQUEST_FORM_PARAMS_DEEP_PARSE</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="default"> <code>true</code> </td> <td class="description last"><p>parse formData field names to create deep object request.body</p></td> </tr> <tr> <td class="name"><code>decorators</code></td> <td class="type"> <span class="param-type">Array.&lt;<a href="global.html#SGAppsServerDecorator">SGAppsServerDecorator</a>></span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="default"> </td> <td class="description last"></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </div> <h3 class="subsection-title">Classes</h3> <dl> <dt><a href="SGAppsServer.NodeJsMvc.html">NodeJsMvc</a></dt> <dd></dd> </dl> <h3 class="subsection-title">Members</h3> <h4 class="name" id="_decorators"><span class="type-signature"></span>_decorators<span class="type-signature"> :Array.&lt;<a href="global.html#SGAppsServerDecorator">SGAppsServerDecorator</a>></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server.js.html">prototypes/server.js</a>, <a href="prototypes_server.js.html#line159">line 159</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type">Array.&lt;<a href="global.html#SGAppsServerDecorator">SGAppsServerDecorator</a>></span> </li> </ul> <h4 class="name" id="_fs"><span class="type-signature"></span>_fs<span class="type-signature"> :object</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server.js.html">prototypes/server.js</a>, <a href="prototypes_server.js.html#line239">line 239</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type">object</span> </li> </ul> <h4 class="name" id="_options"><span class="type-signature"></span>_options<span class="type-signature"> :<a href="global.html#SGAppsServerOptions">SGAppsServerOptions</a></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server.js.html">prototypes/server.js</a>, <a href="prototypes_server.js.html#line178">line 178</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="global.html#SGAppsServerOptions">SGAppsServerOptions</a></span> </li> </ul> <h4 class="name" id="_path"><span class="type-signature"></span>_path<span class="type-signature"> :object</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server.js.html">prototypes/server.js</a>, <a href="prototypes_server.js.html#line246">line 246</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type">object</span> </li> </ul> <h4 class="name" id="_requestListeners"><span class="type-signature"></span>_requestListeners<span class="type-signature"> :Object.&lt;string, <a href="SGAppsServerDictionary.html">SGAppsServerDictionary</a>></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server.js.html">prototypes/server.js</a>, <a href="prototypes_server.js.html#line261">line 261</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type">Object.&lt;string, <a href="SGAppsServerDictionary.html">SGAppsServerDictionary</a>></span> </li> </ul> <h4 class="name" id="_server"><span class="type-signature"></span>_server<span class="type-signature"> :Server</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server.js.html">prototypes/server.js</a>, <a href="prototypes_server.js.html#line151">line 151</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type">Server</span> </li> </ul> <h4 class="name" id="AccessLogger"><span class="type-signature"></span>AccessLogger<span class="type-signature"> :<a href="AccessLogger.html">AccessLogger</a></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="decorators_access-logger.js.html">decorators/access-logger.js</a>, <a href="decorators_access-logger.js.html#line350">line 350</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="AccessLogger.html">AccessLogger</a></span> </li> </ul> <h4 class="name" id="AccessLoggerPaths"><span class="type-signature"></span>AccessLoggerPaths<span class="type-signature"> :Object.&lt;string, <a href="AccessLogger.html#.AccessLoggerPath">AccessLogger.AccessLoggerPath</a>></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="decorators_access-logger.js.html">decorators/access-logger.js</a>, <a href="decorators_access-logger.js.html#line356">line 356</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type">Object.&lt;string, <a href="AccessLogger.html#.AccessLoggerPath">AccessLogger.AccessLoggerPath</a>></span> </li> </ul> <h4 class="name" id="CookiesManager"><span class="type-signature"></span>CookiesManager<span class="type-signature"> :object</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server_extend_request-cookie.js.html">prototypes/server/extend/request-cookie.js</a>, <a href="prototypes_server_extend_request-cookie.js.html#line50">line 50</a> </li></ul></dd> </dl> <h5 class="subsection-title">Properties:</h5> <table class="props"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>COOKIES_KEY</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="default"> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>_enabled</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="default"> <code>true</code> </td> <td class="description last"><p>if is changed to false server will not decorate requests with cookie manager</p></td> </tr> <tr> <td class="name"><code>handle</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="attributes"> </td> <td class="default"> </td> <td class="description last"></td> </tr> </tbody> </table> <h5>Type:</h5> <ul> <li> <span class="param-type">object</span> </li> </ul> <h4 class="name" id="EXTENSIONS"><span class="type-signature"></span>EXTENSIONS<span class="type-signature"> :<a href="global.html#ResourcesExtensions">ResourcesExtensions</a></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server.js.html">prototypes/server.js</a>, <a href="prototypes_server.js.html#line253">line 253</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="global.html#ResourcesExtensions">ResourcesExtensions</a></span> </li> </ul> <h4 class="name" id="logger"><span class="type-signature"></span>logger<span class="type-signature"> :<a href="LoggerBuilder.html">LoggerBuilder</a></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server.js.html">prototypes/server.js</a>, <a href="prototypes_server.js.html#line201">line 201</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="LoggerBuilder.html">LoggerBuilder</a></span> </li> </ul> <h4 class="name" id="MAX_POST_SIZE"><span class="type-signature"></span>MAX_POST_SIZE<span class="type-signature"> :number</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server.js.html">prototypes/server.js</a>, <a href="prototypes_server.js.html#line313">line 313</a> </li></ul></dd> </dl> <div class="description usertext"> <p>default value is <code>16 Kb</code> ยป <code>16 * 1024</code></p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">number</span> </li> </ul> <h4 class="name" id="mountPath"><span class="type-signature"></span>mountPath<span class="type-signature"> :string</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server.js.html">prototypes/server.js</a>, <a href="prototypes_server.js.html#line220">line 220</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id="NodeJsMvc"><span class="type-signature"></span>NodeJsMvc<span class="type-signature"> :<a href="SGAppsServer.NodeJsMvc.html">SGAppsServer.NodeJsMvc</a></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="decorators_nodejs-mvc-bootstrap.js.html">decorators/nodejs-mvc-bootstrap.js</a>, <a href="decorators_nodejs-mvc-bootstrap.js.html#line592">line 592</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="SGAppsServer.NodeJsMvc.html">SGAppsServer.NodeJsMvc</a></span> </li> </ul> <h4 class="name" id="SessionManager"><span class="type-signature"></span>SessionManager<span class="type-signature"> :<a href="SGAppsSessionManager.html">SGAppsSessionManager</a></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server_extend_request-session.js.html">prototypes/server/extend/request-session.js</a>, <a href="prototypes_server_extend_request-session.js.html#line223">line 223</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="SGAppsSessionManager.html">SGAppsSessionManager</a></span> </li> </ul> <h4 class="name" id="shared"><span class="type-signature"></span>shared<span class="type-signature"> :<a href="SGAppsServerShared.html">SGAppsServerShared</a></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server.js.html">prototypes/server.js</a>, <a href="prototypes_server.js.html#line194">line 194</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="SGAppsServerShared.html">SGAppsServerShared</a></span> </li> </ul> <h4 class="name" id="STATUS_CODES"><span class="type-signature"></span>STATUS_CODES<span class="type-signature"> :Object.&lt;number, string></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server.js.html">prototypes/server.js</a>, <a href="prototypes_server.js.html#line187">line 187</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type">Object.&lt;number, string></span> </li> </ul> <h4 class="name" id="TemplateManager"><span class="type-signature"></span>TemplateManager<span class="type-signature"> :<a href="TemplateManager.html">TemplateManager</a></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server_extend_response-template.js.html">prototypes/server/extend/response-template.js</a>, <a href="prototypes_server_extend_response-template.js.html#line160">line 160</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="TemplateManager.html">TemplateManager</a></span> </li> </ul> <h4 class="name" id="whenReady"><span class="type-signature"></span>whenReady<span class="type-signature"> :Promise.&lt;<a href="SGAppsServer.html">SGAppsServer</a>></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server.js.html">prototypes/server.js</a>, <a href="prototypes_server.js.html#line334">line 334</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type">Promise.&lt;<a href="SGAppsServer.html">SGAppsServer</a>></span> </li> </ul> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="all"><span class="type-signature"></span>all<span class="signature">(path, &hellip;handlers)</span><span class="type-signature"> &rarr; {<a href="SGAppsServer.html">SGAppsServer</a>}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server.js.html">prototypes/server.js</a>, <a href="prototypes_server.js.html#line760">line 760</a> </li></ul></dd> </dl> <div class="description usertext"> <p>add handler to all methods</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>path</code></td> <td class="type"> <span class="param-type"><a href="global.html#RequestPathStructure">RequestPathStructure</a></span> </td> <td class="attributes"> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>handlers</code></td> <td class="type"> <span class="param-type"><a href="global.html#RequestHandler">RequestHandler</a></span> </td> <td class="attributes"> &lt;repeatable><br> </td> <td class="description last"></td> </tr> </tbody> </table> <h5>Returns:</h5> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type"><a href="SGAppsServer.html">SGAppsServer</a></span> </dd> </dl> <h4 class="name" id="connect"><span class="type-signature"></span>connect<span class="signature">(path, &hellip;handlers)</span><span class="type-signature"> &rarr; {<a href="SGAppsServer.html">SGAppsServer</a>}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server.js.html">prototypes/server.js</a>, <a href="prototypes_server.js.html#line728">line 728</a> </li></ul></dd> </dl> <div class="description usertext"> <p>The <code>CONNECT</code> method establishes a tunnel to the server identified by the target resource.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>path</code></td> <td class="type"> <span class="param-type"><a href="global.html#RequestPathStructure">RequestPathStructure</a></span> </td> <td class="attributes"> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>handlers</code></td> <td class="type"> <span class="param-type"><a href="global.html#RequestHandler">RequestHandler</a></span> </td> <td class="attributes"> &lt;repeatable><br> </td> <td class="description last"></td> </tr> </tbody> </table> <h5>Returns:</h5> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type"><a href="SGAppsServer.html">SGAppsServer</a></span> </dd> </dl> <h4 class="name" id="delete"><span class="type-signature"></span>delete<span class="signature">(path, &hellip;handlers)</span><span class="type-signature"> &rarr; {<a href="SGAppsServer.html">SGAppsServer</a>}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server.js.html">prototypes/server.js</a>, <a href="prototypes_server.js.html#line696">line 696</a> </li></ul></dd> </dl> <div class="description usertext"> <p>The <code>DELETE</code> method deletes the specified resource.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>path</code></td> <td class="type"> <span class="param-type"><a href="global.html#RequestPathStructure">RequestPathStructure</a></span> </td> <td class="attributes"> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>handlers</code></td> <td class="type"> <span class="param-type"><a href="global.html#RequestHandler">RequestHandler</a></span> </td> <td class="attributes"> &lt;repeatable><br> </td> <td class="description last"></td> </tr> </tbody> </table> <h5>Returns:</h5> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type"><a href="SGAppsServer.html">SGAppsServer</a></span> </dd> </dl> <h4 class="name" id="Email"><span class="type-signature"></span>Email<span class="signature">(config)</span><span class="type-signature"> &rarr; {<a href="SGAppsServerEmail.html">SGAppsServerEmail</a>}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server.js.html">prototypes/server.js</a>, <a href="prototypes_server.js.html#line210">line 210</a> </li></ul></dd> </dl> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>config</code></td> <td class="type"> <span class="param-type"><a href="SGAppsServerEmail.html#.Config">SGAppsServerEmail.Config</a></span> </td> <td class="description last"></td> </tr> </tbody> </table> <h5>Returns:</h5> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type"><a href="SGAppsServerEmail.html">SGAppsServerEmail</a></span> </dd> </dl> <h4 class="name" id="finalHandler"><span class="type-signature"></span>finalHandler<span class="signature">(path, &hellip;handlers)</span><span class="type-signature"> &rarr; {<a href="SGAppsServer.html">SGAppsServer</a>}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server.js.html">prototypes/server.js</a>, <a href="prototypes_server.js.html#line782">line 782</a> </li></ul></dd> </dl> <div class="description usertext"> <p>add final handler to all methods, last added is first</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>path</code></td> <td class="type"> <span class="param-type"><a href="global.html#RequestPathStructure">RequestPathStructure</a></span> </td> <td class="attributes"> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>handlers</code></td> <td class="type"> <span class="param-type"><a href="global.html#RequestHandler">RequestHandler</a></span> </td> <td class="attributes"> &lt;repeatable><br> </td> <td class="description last"></td> </tr> </tbody> </table> <h5>Returns:</h5> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type"><a href="SGAppsServer.html">SGAppsServer</a></span> </dd> </dl> <h4 class="name" id="get"><span class="type-signature"></span>get<span class="signature">(path, &hellip;handlers)</span><span class="type-signature"> &rarr; {<a href="SGAppsServer.html">SGAppsServer</a>}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server.js.html">prototypes/server.js</a>, <a href="prototypes_server.js.html#line632">line 632</a> </li></ul></dd>