UNPKG

@nodefony/monitoring-bundle

Version:
237 lines (213 loc) 87.8 kB
import{_ as o}from"./plugin-vue_export-helper-DlAUqK2U.js";import{r as l,o as r,c as i,b as n,e,d as s,f as t}from"./app-CAAMsCo-.js";const p={},c=n("p",{align:"center"},[n("img",{src:"https://github.com/nodefony/nodefony/raw/master/src/nodefony/bundles/framework-bundle/Resources/public/images/nodefony-logo.png"}),n("br")],-1),d=n("h1",{align:"center"},"NODEFONY V7",-1),u={href:"https://nodei.co/npm/nodefony",target:"_blank",rel:"noopener noreferrer"},m=n("img",{src:"https://nodei.co/npm/nodefony.png?downloads=true&downloadRank=true&stars=true",alt:"npm package",tabindex:"0",loading:"lazy"},null,-1),v=n("figcaption",null,"npm package",-1),h={href:"https://github.com/nodefony/nodefony/issues",target:"_blank",rel:"noopener noreferrer"},k=n("img",{src:"https://img.shields.io/github/issues/nodefony/nodefony.svg",alt:"Issues Status",loading:"lazy"},null,-1),b={href:"https://github.com/nodefony/nodefony/actions",target:"_blank",rel:"noopener noreferrer"},g=n("img",{src:"https://github.com/nodefony/nodefony/workflows/nodefony/badge.svg",alt:"Build Status",loading:"lazy"},null,-1),f={href:"https://bestpractices.coreinfrastructure.org/projects/495",target:"_blank",rel:"noopener noreferrer"},y=n("img",{src:"https://bestpractices.coreinfrastructure.org/projects/495/badge",alt:"CII Best Practices",loading:"lazy"},null,-1),_=t('<p>Nodefony is Node.js full-stack web framework.</p><p>Nodefony can be used to develop a complete solution to create a Fullstack Web Application, Secure Api, or Microservices.</p><h2 id="table-of-content" tabindex="-1"><a class="header-anchor" href="#table-of-content" aria-hidden="true">#</a> Table of content</h2><ul><li><a href="#features">Features</a></li><li><a href="#requirements">Requirements</a></li><li><a href="#install">Linux OSX Installation</a></li><li><a href="#installwin32">Windows Installation </a></li><li><a href="#buildcli">Build Nodefony Project with CLI (Command Line Interface)</a></li><li><a href="#buildstarter">Build Nodefony Project with STARTER</a></li><li><a href="#start">Start Development Mode</a></li><li><a href="#start_prod">Start Production Mode</a></li><li><a href="#configurations">Configurations</a></li><li><a href="#bundles">Quick Start</a></li><li><a href="#https">HTTPS Access</a></li><li><a href="#references--thanks">References / Thanks</a></li><li><a href="#authors">Authors</a></li><li><a href="#license">License</a></li><li><a href="#demo">Demo</a></li></ul><h2 id="nodefony-features" tabindex="-1"><a class="header-anchor" href="#nodefony-features" aria-hidden="true">#</a> <a name="features"></a>Nodefony features :</h2>',5),w={href:"https://nodejs.org/dist/latest-v8.x/docs/api/https.html",target:"_blank",rel:"noopener noreferrer"},x={href:"https://github.com/theturtle32/WebSocket-Node",target:"_blank",rel:"noopener noreferrer"},q={href:"https://nodejs.org/api/http2.html",target:"_blank",rel:"noopener noreferrer"},j=n("li",null,"Dynamics routing",-1),N={href:"http://docs.sequelizejs.com",target:"_blank",rel:"noopener noreferrer"},S={href:"http://mongoosejs.com/index.html",target:"_blank",rel:"noopener noreferrer"},C=n("li",null,"Simple Databases Services connections (Redis, Mongo, Elasticsearch, mysql, sqlite ...).",-1),E={href:"https://github.com/twigjs/twig.js",target:"_blank",rel:"noopener noreferrer"},P=n("li",null,"Notion of real-time context in Action Controller (websocket).",-1),I=n("li",null,"Notion of synchronous or asynchronous execution in Action Controller (Promise, Async, Await).",-1),T=n("li",null,"Services Containers, Dependency Injection (Design Patterns)",-1),R=n("li",null,"Sessions Manager (ORM, Memcached)",-1),A=n("li",null,"Authentication Manager (Digest, Basic, oAuth, Local, ldap, jwt, openid, passportjs)",-1),O=n("li",null,"WAF ( Web application firewall )",-1),M={href:"https://www.w3.org/TR/cors/",target:"_blank",rel:"noopener noreferrer"},D={href:"https://github.com/Unitech/pm2/",target:"_blank",rel:"noopener noreferrer"},L={href:"http://autogrowsystems.github.io/faye-go/",target:"_blank",rel:"noopener noreferrer"},$=n("li",null,"Webpack Assets management (Like WDS with HMR hot module Replacement)",-1),B=n("li",null,"C++ Addons (Binding in Bundle)",-1),U=n("li",null,"Translations",-1),V=n("li",null,"CLI (Command Line Interface)",-1),G=n("li",null,"Monitororing , Debug Bar",-1),W={href:"https://mochajs.org/",target:"_blank",rel:"noopener noreferrer"},F=n("p",null,[n("strong",null,"Nodefony assimilates into the ecosystem of node.js with services like"),s(" :")],-1),H={href:"https://webpack.js.org/",target:"_blank",rel:"noopener noreferrer"},Y={href:"https://github.com/sockjs",target:"_blank",rel:"noopener noreferrer"},z={href:"https://nodejs.org/docs/latest/api/fs.html#fs_fs_watch_filename_options_listener",target:"_blank",rel:"noopener noreferrer"},X={href:"http://pm2.keymetrics.io/",target:"_blank",rel:"noopener noreferrer"},K={href:"http://passportjs.org/",target:"_blank",rel:"noopener noreferrer"},J={href:"https://github.com/angular/angular-cli",target:"_blank",rel:"noopener noreferrer"},Q=n("p",null,[n("strong",null,"Nodefony 7 adds the following features"),s(" :")],-1),Z={href:"https://github.com/facebookincubator/create-react-app",target:"_blank",rel:"noopener noreferrer"},nn={href:"https://vuejs.org",target:"_blank",rel:"noopener noreferrer"},sn={href:"https://swagger.io/",target:"_blank",rel:"noopener noreferrer"},an={href:"https://graphql.org/",target:"_blank",rel:"noopener noreferrer"},en=n("p",null,"Evolution priorities for the next version will focus on robustness, unit testing, documentation and security.",-1),tn={href:"https://github.com/nodefony/nodefony/actions",target:"_blank",rel:"noopener noreferrer"},on=n("h2",{id:"nodefony-implement-modules-with-commonjs-and-ecmascript-6-class-inheritance",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#nodefony-implement-modules-with-commonjs-and-ecmascript-6-class-inheritance","aria-hidden":"true"},"#"),s(" Nodefony implement modules with CommonJS and ECMAScript 6 ( Class, Inheritance ).")],-1),ln=n("p",null,"The development framework will not be ported to typescript, but will wait for the version with type syntax in Emacsript",-1),rn={href:"https://github.com/tc39/proposal-type-annotations",target:"_blank",rel:"noopener noreferrer"},pn=n("h2",{id:"resources-for-newcomers",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#resources-for-newcomers","aria-hidden":"true"},"#"),s(),n("strong",null,"Resources for Newcomers")],-1),cn={id:"nodefony-starter-demo",tabindex:"-1"},dn=n("a",{class:"header-anchor",href:"#nodefony-starter-demo","aria-hidden":"true"},"#",-1),un={href:"https://nodefony.net",target:"_blank",rel:"noopener noreferrer"},mn={id:"nodefony-core",tabindex:"-1"},vn=n("a",{class:"header-anchor",href:"#nodefony-core","aria-hidden":"true"},"#",-1),hn={href:"https://github.com/nodefony/nodefony",target:"_blank",rel:"noopener noreferrer"},kn={id:"nodefony-documentation",tabindex:"-1"},bn=n("a",{class:"header-anchor",href:"#nodefony-documentation","aria-hidden":"true"},"#",-1),gn={href:"https://nodefony.net/documentation/nodefony",target:"_blank",rel:"noopener noreferrer"},fn=t('<h4 id="documentation-in-progress" tabindex="-1"><a class="header-anchor" href="#documentation-in-progress" aria-hidden="true">#</a> Documentation in progress !!</h4><h2 id="requirements" tabindex="-1"><a class="header-anchor" href="#requirements" aria-hidden="true">#</a> <a name="requirements"></a>Requirements</h2><h4 id="on-your-system-you-must-have-installed" tabindex="-1"><a class="header-anchor" href="#on-your-system-you-must-have-installed" aria-hidden="true">#</a> On your system <em>you must have Installed</em> :</h4>',3),yn={href:"http://git-scm.com/",target:"_blank",rel:"noopener noreferrer"},_n={href:"https://nodejs.org/",target:"_blank",rel:"noopener noreferrer"},wn={href:"https://www.npmjs.com/",target:"_blank",rel:"noopener noreferrer"},xn={href:"https://yarnpkg.com/lang/en/",target:"_blank",rel:"noopener noreferrer"},qn={href:"https://pnpm.io/cli/install",target:"_blank",rel:"noopener noreferrer"},jn={href:"https://github.com/nvm-sh/nvm/",target:"_blank",rel:"noopener noreferrer"},Nn={href:"https://www.openssl.org/",target:"_blank",rel:"noopener noreferrer"},Sn={href:"https://www.gnu.org/software/bash/",target:"_blank",rel:"noopener noreferrer"},Cn=n("h4",{id:"operating-systems",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#operating-systems","aria-hidden":"true"},"#"),s(" Operating Systems :")],-1),En=t("<li><p>LINUX</p><ul><li>Debian, Ubuntu (Checked, Tested)</li><li>RASPBIAN Raspberry Pi (Checked)</li></ul></li><li><p>MACOS (Checked, Tested)</p></li><li><p>WINDOWS (Checked)</p></li><li><p>FreeBSD (Checked)</p><ul><li>pkg install bash gmake gcc6</li><li>setenv CC &quot;/usr/local/bin/gcc&quot;</li><li>setenv CXX &quot;/usr/local/bin/g++&quot;</li><li>cd /usr/local/bin/ ;ln -s pythonx.x python</li></ul></li><li><p><s>OpenBSD (Not Checked yet )</s></p></li>",5),Pn={href:"https://github.com/nodefony/nodefony-electron",target:"_blank",rel:"noopener noreferrer"},In=n("li",null,[n("p",null,"EMBEDDED SYSTEM ( Very difficult : large memory footprint )")],-1),Tn=n("h2",{id:"linux-or-osx-installation-recommanded",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#linux-or-osx-installation-recommanded","aria-hidden":"true"},"#"),s(),n("a",{name:"install"}),s(" Linux or OSX Installation (Recommanded)")],-1),Rn={href:"https://github.com/nvm-sh/nvm#installation-and-update",target:"_blank",rel:"noopener noreferrer"},An={href:"https://github.com/creationix/nvm",target:"_blank",rel:"noopener noreferrer"},On=t(`<p>To install or update nvm, you can use the install script:</p><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code><span class="token function">curl</span> -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh <span class="token operator">|</span> <span class="token function">bash</span> <span class="token comment"># or</span> <span class="token function">wget</span> -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh <span class="token operator">|</span> <span class="token function">bash</span> $ <span class="token builtin class-name">source</span> ~/.bashrc <span class="token comment"># or source ~/.bash_profile</span> $ nvm ls-remote <span class="token comment"># show all remote versions</span> $ nvm <span class="token function">ls</span> <span class="token comment"># show local versions</span> </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div>`,2),Mn={href:"https://nodejs.org/",target:"_blank",rel:"noopener noreferrer"},Dn={href:"https://github.com/creationix/nvm",target:"_blank",rel:"noopener noreferrer"},Ln=t(`<div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code>nvm <span class="token function">install</span> <span class="token function">node</span> <span class="token comment"># &quot;node&quot; is an alias for the latest version</span> </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div>`,1),$n={href:"https://nodefony.net",target:"_blank",rel:"noopener noreferrer"},Bn=t(`<div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code><span class="token function">npm</span> <span class="token parameter variable">-g</span> <span class="token function">install</span> nodefony <span class="token comment"># or with yarn</span> <span class="token function">yarn</span> global <span class="token function">add</span> nodefony </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><strong>Error that you can usually find</strong> :</p>`,2),Un={href:"https://docs.npmjs.com/getting-started/fixing-npm-permissions",target:"_blank",rel:"noopener noreferrer"},Vn=n("li",null,"Different Node.js version (NODE_MODULE_VERSION XX) use 'nodefony rebuild'",-1),Gn=n("h2",{id:"windows-installation",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#windows-installation","aria-hidden":"true"},"#"),s(),n("a",{name:"installwin32"}),s(" Windows Installation")],-1),Wn={href:"https://nodejs.org/en/",target:"_blank",rel:"noopener noreferrer"},Fn={href:"https://github.com/coreybutler/nvm-windows#node-version-manager-nvm-for-windows",target:"_blank",rel:"noopener noreferrer"},Hn={href:"https://nodejs.org/en/",target:"_blank",rel:"noopener noreferrer"},Yn={href:"https://nodefony.net",target:"_blank",rel:"noopener noreferrer"},zn=t(`<p>Launch a CMD terminal</p><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code><span class="token function">npm</span> <span class="token parameter variable">-g</span> <span class="token function">install</span> nodefony <span class="token comment"># or with yarn</span> <span class="token function">yarn</span> global <span class="token function">add</span> nodefony </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><strong>Add NPM global bin in $Path windows</strong> :</p><p>On the Windows System Property Menu, configure <em>Path</em> environment variable by adding :</p><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code>C:<span class="token punctuation">\\</span>Users<span class="token punctuation">\\</span>myuser<span class="token punctuation">\\</span>AppData<span class="token punctuation">\\</span>Roaming<span class="token punctuation">\\</span>npm or C:<span class="token punctuation">\\</span>Users<span class="token punctuation">\\</span>myuser<span class="token punctuation">\\</span>AppData<span class="token punctuation">\\</span>Roaming<span class="token punctuation">\\</span>npm<span class="token punctuation">\\</span>bin </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="use-nodefony-cli" tabindex="-1"><a class="header-anchor" href="#use-nodefony-cli" aria-hidden="true">#</a> <a name="usecli"></a> Use nodefony cli:</h2><p><strong>Cli command when use Global installation</strong></p><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code>$ nodefony <span class="token parameter variable">-v</span> <span class="token number">7.0</span>.0 </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div><p><strong>Cli command when By using yarn or npm in trunk</strong></p><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code><span class="token comment">#Or by using yarn</span> <span class="token function">yarn</span> run nodefony <span class="token comment">#Or by using npm</span> <span class="token function">npm</span> run nodefony </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><strong>By using npx</strong><em><strong>note: npx is included with npm &gt; v5.2 or can be installed separately.</strong></em></p><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code>npx nodefony </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p><strong>The long way with the full path</strong></p><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code>./node_modules/.bin/nodefony <span class="token comment">#Or with the shortcut using npm bin</span> <span class="token variable"><span class="token variable">$(</span><span class="token function">npm</span> bin<span class="token variable">)</span></span>/nodefony </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="build-project-with-nodefony-cli-recommended" tabindex="-1"><a class="header-anchor" href="#build-project-with-nodefony-cli-recommended" aria-hidden="true">#</a> <a name="buildcli"></a> Build Project with nodefony cli (recommended):</h2><p><strong>Cli Usage INTERACTIVE MODE</strong> :</p><p>YOU CAN USE CLI INTERACTIVE MODE (nodefony without args) :</p><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code>$ nodefony ? Nodefony CLI <span class="token builtin class-name">:</span> <span class="token punctuation">(</span>Use arrow keys<span class="token punctuation">)</span> ❯ Create Nodefony Web Project Create Micro Service Project PM2 Tools -------- Help Quit </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><strong>Cli Usage NO INTERRATIVE</strong> :</p><p>YOU CAN USE CLI NO INTERACTIVE (nodefony with args) :</p><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code><span class="token comment"># CLI generate project name : myproject</span> $ npx nodefony create myproject $ <span class="token builtin class-name">cd</span> myproject </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><strong>Cli Help</strong> :</p><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code>$ npx nodefony <span class="token parameter variable">-h</span> nodefony create <span class="token punctuation">[</span>-i<span class="token punctuation">]</span> name <span class="token punctuation">[</span>path<span class="token punctuation">]</span> Create New Nodefony Project </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="build-project-with-github-starter" tabindex="-1"><a class="header-anchor" href="#build-project-with-github-starter" aria-hidden="true">#</a> <a name="buildstarter"></a> Build Project with Github Starter :</h2><p><strong>CLI</strong> :</p><p>Clone nodefony starter</p><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code>$ <span class="token function">git</span> clone https://github.com/nodefony/nodefony-starter.git $ <span class="token builtin class-name">cd</span> nodefony $ npx nodefony build <span class="token punctuation">..</span>. <span class="token punctuation">..</span>. $ <span class="token function">npm</span> start </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><strong>CLI INTERATIVE</strong> :</p><p>YOU CAN USE CLI INTERACTIVE MODE TO BUILD PROJECT (nodefony without args)</p><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code>$ <span class="token function">git</span> clone https://github.com/nodefony/nodefony-starter.git $ <span class="token builtin class-name">cd</span> nodefony $ <span class="token function">ls</span> <span class="token parameter variable">-l</span> -rw-r--r-- <span class="token number">1</span> cci staff <span class="token number">21306</span> <span class="token number">27</span> mar <span class="token number">19</span>:22 README.md drwxr-xr-x <span class="token number">12</span> cci staff <span class="token number">384</span> <span class="token number">27</span> mar <span class="token number">19</span>:25 app drwxr-xr-x <span class="token number">3</span> cci staff <span class="token number">96</span> <span class="token number">27</span> mar <span class="token number">19</span>:22 bin drwxr-xr-x <span class="token number">7</span> cci staff <span class="token number">224</span> <span class="token number">27</span> mar <span class="token number">19</span>:26 config drwxr-xr-x <span class="token number">3</span> cci staff <span class="token number">96</span> <span class="token number">27</span> mar <span class="token number">19</span>:22 doc drwxr-xr-x <span class="token number">1342</span> cci staff <span class="token number">42944</span> <span class="token number">27</span> mar <span class="token number">19</span>:24 node_modules -rw-r--r-- <span class="token number">1</span> cci staff <span class="token number">997</span> <span class="token number">27</span> mar <span class="token number">19</span>:22 package.json drwxr-xr-x <span class="token number">3</span> cci staff <span class="token number">96</span> <span class="token number">27</span> mar <span class="token number">19</span>:22 src drwxr-xr-x <span class="token number">4</span> cci staff <span class="token number">128</span> <span class="token number">29</span> mar <span class="token number">11</span>:13 tmp drwxr-xr-x <span class="token number">12</span> cci staff <span class="token number">384</span> <span class="token number">29</span> mar <span class="token number">11</span>:01 web -rw-r--r-- <span class="token number">1</span> cci staff <span class="token number">542660</span> <span class="token number">27</span> mar <span class="token number">19</span>:24 yarn.lock $ npx nodefony ? Nodefony CLI <span class="token builtin class-name">:</span> <span class="token punctuation">(</span>Use arrow keys<span class="token punctuation">)</span> ❯ Build Project Generater Tools PM2 Tools -------- Help Quit </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="serving-a-nodefony-project-via-an-development-server" tabindex="-1"><a class="header-anchor" href="#serving-a-nodefony-project-via-an-development-server" aria-hidden="true">#</a> <a name="start"></a>Serving a Nodefony project via an development server</h2><p><strong>Starting Development Servers</strong> :</p><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code>$ npx nodefony dev <span class="token comment"># TO STOP</span> $ <span class="token operator">&lt;</span>ctrl-c<span class="token operator">&gt;</span> </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><strong>Starting Development Servers in Debug Mode (-d)</strong> :</p><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code>$ npx nodefony <span class="token parameter variable">-d</span> dev <span class="token comment"># TO STOP</span> $ <span class="token operator">&lt;</span>ctrl-c<span class="token operator">&gt;</span> </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>OR YOU CAN USE CLI INTERACTIVE MODE (nodefony without args)</p><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code> _ _ ___ ____ _____ _____ ___ _ _ __ __ <span class="token operator">|</span> <span class="token punctuation">\\</span> <span class="token operator">|</span> <span class="token operator">|</span> / _ <span class="token punctuation">\\</span> <span class="token operator">|</span> _ <span class="token punctuation">\\</span> <span class="token operator">|</span> ____<span class="token operator">|</span> <span class="token operator">|</span> ___<span class="token operator">|</span> / _ <span class="token punctuation">\\</span> <span class="token operator">|</span> <span class="token punctuation">\\</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token punctuation">\\</span> <span class="token punctuation">\\</span> / / <span class="token operator">|</span> <span class="token punctuation">\\</span><span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> _<span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span>_ <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token punctuation">\\</span><span class="token operator">|</span> <span class="token operator">|</span> <span class="token punctuation">\\</span> V / <span class="token operator">|</span> <span class="token operator">|</span><span class="token punctuation">\\</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span>_<span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span>_<span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span>___ <span class="token operator">|</span> _<span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span>_<span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span><span class="token punctuation">\\</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span>_<span class="token operator">|</span> <span class="token punctuation">\\</span>_<span class="token operator">|</span> <span class="token punctuation">\\</span>___/ <span class="token operator">|</span>____/ <span class="token operator">|</span>_____<span class="token operator">|</span> <span class="token operator">|</span>_<span class="token operator">|</span> <span class="token punctuation">\\</span>___/ <span class="token operator">|</span>_<span class="token operator">|</span> <span class="token punctuation">\\</span>_<span class="token operator">|</span> <span class="token operator">|</span>_<span class="token operator">|</span> Version <span class="token builtin class-name">:</span> <span class="token number">4.0</span>.0 Platform <span class="token builtin class-name">:</span> linux Process <span class="token builtin class-name">:</span> nodefony PID <span class="token builtin class-name">:</span> <span class="token number">31635</span> Fri Jul <span class="token number">27</span> <span class="token number">2018</span> <span class="token number">17</span>:01:11 INFO nodefony <span class="token builtin class-name">:</span> WELCOME PROJECT <span class="token builtin class-name">:</span> myproject <span class="token number">1.0</span>.0 ? Nodefony CLI <span class="token builtin class-name">:</span> ❯ Start Servers Development Start Servers Pre-Production Start Servers Production Install Project Rebuild Project Generater Tools PM2 Tools Run Test -------- Help Quit </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><strong>Starting Development Servers in Inspector mode (--inspect)</strong> :</p>`,38),Xn={href:"https://nodejs.org/en/docs/guides/debugging-getting-started",target:"_blank",rel:"noopener noreferrer"},Kn=t(`<div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code>$ <span class="token function">npm</span> <span class="token parameter variable">-g</span> <span class="token function">install</span> npx $ npx --node-arg<span class="token operator">=</span>--inspect nodefony dev // new version npx <span class="token operator">&gt;</span> <span class="token number">7</span> $ npx --node-options<span class="token operator">=</span>--inspect nodefony dev <span class="token comment"># check chrome://inspect in your browser</span> </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="serving-a-nodefony-project-via-a-production-server" tabindex="-1"><a class="header-anchor" href="#serving-a-nodefony-project-via-a-production-server" aria-hidden="true">#</a> <a name="start_prod"></a>Serving a Nodefony Project via a Production server :</h2>`,2),Jn={href:"http://pm2.keymetrics.io/",target:"_blank",rel:"noopener noreferrer"},Qn=t(`<div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code>$ npx nodefony prod or $ npx nodefony start </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>Tools PM2 You can see PM2 config : config/pm2.config.js</p><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code><span class="token comment"># To See log</span> $ npx nodefony logs <span class="token comment"># To List Status of Production projects</span> $ npx nodefony list <span class="token comment"># TO KILL PM2 DEAMON</span> $ npx nodefony <span class="token function">kill</span> <span class="token comment"># TO STOP APPLICATION WITHOUT KILL PM2 DEAMON</span> $ npx nodefony stop <span class="token comment"># YOU can use all pm2 command by using</span> $ <span class="token function">yarn</span> pm2 monit $ <span class="token function">yarn</span> pm2 <span class="token punctuation">[</span>list<span class="token operator">|</span><span class="token function">ls</span><span class="token operator">|</span>status<span class="token punctuation">]</span> $ <span class="token function">yarn</span> pm2 stop all or $ <span class="token function">npm</span> run pm2 logs <span class="token parameter variable">--lines</span> <span class="token number">200</span> </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><strong>Checking a Nodefony Project Pre-Production (Usefull to check Clusters Node)</strong> :</p><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code>$ npx nodefony preprod </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h2 id="serving-a-nodefony-project-with-https-or-wss" tabindex="-1"><a class="header-anchor" href="#serving-a-nodefony-project-with-https-or-wss" aria-hidden="true">#</a> <a name="https"></a>Serving a Nodefony project with HTTPS or WSS</h2><p>By default nodefony listen secure port in 5152 @see config/config.js</p><p>During the installation process all the openssl parts were generated ( self-signed localhost certificate ).</p><p>You can Change default openssl configuration in :</p><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code><span class="token function">ls</span> <span class="token parameter variable">-l</span> config/openssl ├── ca │ └── openssl.cnf └── ca_intermediate └── openssl.cnf </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>You must Add a Trusted CA in your Browser : projectName-root-ca.crt.pem You can find certificate authority (ca) here:</p><pre><code>config/certificates/ca/projectName-root-ca.crt.pem </code></pre>`,12),Zn={id:"access-to-secure-app-with-url-https-localhost-5152",tabindex:"-1"},ns=n("a",{class:"header-anchor",href:"#access-to-secure-app-with-url-https-localhost-5152","aria-hidden":"true"},"#",-1),ss={href:"https://localhost:5152",target:"_blank",rel:"noopener noreferrer"},as={id:"access-to-app-with-url-http-localhost-5151",tabindex:"-1"},es=n("a",{class:"header-anchor",href:"#access-to-app-with-url-http-localhost-5151","aria-hidden":"true"},"#",-1),ts={href:"http://localhost:5151",target:"_blank",rel:"noopener noreferrer"},os={href:"https://nodefony.net",target:"_blank",rel:"noopener noreferrer"},ls=n("img",{src:"https://raw.githubusercontent.com/nodefony/nodefony/master/src/nodefony/bundles/monitoring-bundle/Resources/public/images/nodefony.png",alt:"nodefony",tabindex:"0",loading:"lazy"},null,-1),rs=n("figcaption",null,"nodefony",-1),is=n("h2",{id:"framework-configurations",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#framework-configurations","aria-hidden":"true"},"#"),s(),n("a",{name:"configurations"}),s("Framework Configurations")],-1),ps={href:"https://github.com/nodefony/nodefony/blob/master/config/config.js",target:"_blank",rel:"noopener noreferrer"},cs=t(`<div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code><span class="token doc-comment comment">/** * NODEFONY FRAMEWORK * * KERNEL CONFIG * * Domain listen : Nodefony can listen only one domain ( no vhost ) * Example : * domain : 0.0.0.0 // for all interfaces * domain : [::1] // for IPV6 only * domain : 192.168.1.1 // IPV4 * domain : mydomain.com // DNS * * Domain Alias : string only &quot;&lt;&lt;regexp&gt;&gt;&quot; use domainCheck : true * Example : * domainAlias:[ * &quot;^127.0.0.1$&quot;, * &quot;^localhost$&quot;, * &quot;.*\\\\.nodefony\\\\.com&quot;, * &quot;^nodefony\\\\.eu$&quot;, * &quot;^.*\\\\.nodefony\\\\.eu$&quot; * ] */</span> <span class="token keyword">const</span> path <span class="token operator">=</span> <span class="token function">require</span><span class="token punctuation">(</span><span class="token string">&quot;path&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span> module<span class="token punctuation">.</span>exports <span class="token operator">=</span> <span class="token punctuation">{</span> <span class="token literal-property property">system</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token literal-property property">domain</span><span class="token operator">:</span> <span class="token string">&quot;0.0.0.0&quot;</span><span class="token punctuation">,</span> <span class="token literal-property property">domainAlias</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token string">&quot;^127.0.0.1$&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;^localhost$&quot;</span> <span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token literal-property property">httpPort</span><span class="token operator">:</span> <span class="token number">5151</span><span class="token punctuation">,</span> <span class="token literal-property property">httpsPort</span><span class="token operator">:</span> <span class="token number">5152</span><span class="token punctuation">,</span> <span class="token literal-property property">domainCheck</span><span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span> <span class="token literal-property property">locale</span><span class="token operator">:</span> <span class="token string">&quot;en_en&quot;</span><span class="token punctuation">,</span> <span class="token doc-comment comment">/** * BUNDLES CORE */</span> <span class="token literal-property property">security</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token literal-property property">realtime</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token literal-property property">monitoring</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token literal-property property">mail</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token literal-property property">documentation</span><span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span> <span class="token literal-property property">unitTest</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token literal-property property">redis</span><span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span> <span class="token literal-property property">mongo</span><span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span> <span class="token literal-property property">elastic</span><span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span> <span class="token doc-comment comment">/** * SERVERS */</span> <span class="token literal-property property">servers</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token literal-property property">statics</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token literal-property property">protocol</span><span class="token operator">:</span> <span class="token string">&quot;2.0&quot;</span><span class="token punctuation">,</span> <span class="token comment">// 2.0 || 1.1</span> <span class="token literal-property property">http</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token literal-property property">https</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token literal-property property">ws</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token literal-property property">wss</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token literal-property property">certificats</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token literal-property property">key</span><span class="token operator">:</span> path<span class="token punctuation">.</span><span class="token function">resolve</span><span class="token punctuation">(</span><span class="token string">&quot;config&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;certificates&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;server&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;privkey.pem&quot;</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token literal-property property">cert</span><span class="token operator">:</span> path<span class="token punctuation">.</span><span class="token function">resolve</span><span class="token punctuation">(</span><span class="token string">&quot;config&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;certificates&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;server&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;fullchain.pem&quot;</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token literal-property property">ca</span><span class="token operator">:</span> path<span class="token punctuation">.</span><span class="token function">resolve</span><span class="token punctuation">(</span><span class="token string">&quot;config&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;certificates&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;ca&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;nodefony-root-ca.crt.pem&quot;</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token literal-property property">options</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token literal-property property">rejectUnauthorized</span><span class="token operator">:</span> <span class="token boolean">true</span> <span class="token punctuation">}</span> <span class="token punctuation">}</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token doc-comment comment">/** * DEV SERVER */</span> <span class="token literal-property property">devServer</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token literal-property property">inline</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token literal-property property">hot</span><span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span> <span class="token literal-property property">hotOnly</span><span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span> <span class="token literal-property property">overlay</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token literal-property property">logLevel</span><span class="token operator">:</span> <span class="token string">&quot;info&quot;</span><span class="token punctuation">,</span> <span class="token comment">// none, error, warning or info</span> <span class="token literal-property property">progress</span><span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span> <span class="token literal-property property">protocol</span><span class="token operator">:</span> <span class="token string">&quot;https&quot;</span><span class="token punctuation">,</span> <span class="token literal-property property">websocket</span><span class="token operator">:</span> <span class="token boolean">true</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token doc-comment comment">/** * BUNDLES LOCAL REGISTRATION * Example : * bundles: <span class="token punctuation">{</span> * hello-bundle : &quot;file:src/bundles/hello-bundle&quot;, * test-bundle : path.resolve(&quot;src&quot;,&quot;bundles&quot;,&quot;test-bundle&quot;) * <span class="token punctuation">}</span> */</span> <span class="token literal-property property">bundles</span><span class="token operator">:</span> <span class="token punctuation">{</span><span class="token punctuation">}</span> <span class="token operator">...</span> </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="quick-start" tabindex="-1"><a class="header-anchor" href="#quick-start" aria-hidden="true">#</a> <a name="bundles"></a>Qu