{"id":21140673,"url":"https://github.com/nodefony/nodefony","last_synced_at":"2025-07-09T04:31:34.705Z","repository":{"id":39459724,"uuid":"87920382","full_name":"nodefony/nodefony","owner":"nodefony","description":"nodefony core framework","archived":false,"fork":false,"pushed_at":"2024-08-06T10:22:44.000Z","size":96282,"stargazers_count":19,"open_issues_count":8,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-11T05:17:00.137Z","etag":null,"topics":["cli","framework","http2","nodejs","pm2","sequelize","sockjs","vuejs","webpack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nodefony.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["ccamensuli"]}},"created_at":"2017-04-11T10:18:48.000Z","updated_at":"2024-08-05T12:44:08.000Z","dependencies_parsed_at":"2023-10-28T20:26:36.498Z","dependency_job_id":"ae433965-3a81-49be-9ee0-4a36688c2d0e","html_url":"https://github.com/nodefony/nodefony","commit_stats":{"total_commits":2205,"total_committers":4,"mean_commits":551.25,"dds":"0.0054421768707483276","last_synced_commit":"d2f3d9c938d1816778b0a50142a3730277d584a3"},"previous_names":[],"tags_count":122,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodefony%2Fnodefony","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodefony%2Fnodefony/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodefony%2Fnodefony/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodefony%2Fnodefony/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nodefony","download_url":"https://codeload.github.com/nodefony/nodefony/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225465310,"owners_count":17478521,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","framework","http2","nodejs","pm2","sequelize","sockjs","vuejs","webpack"],"created_at":"2024-11-20T07:17:08.012Z","updated_at":"2024-11-20T07:17:08.715Z","avatar_url":"https://github.com/nodefony.png","language":"JavaScript","funding_links":["https://github.com/sponsors/ccamensuli"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/nodefony/nodefony/raw/master/src/nodefony/bundles/framework-bundle/Resources/public/images/nodefony-logo.png\"\u003e\u003cbr\u003e\n\u003c/p\u003e\n\u003ch1 align=\"center\"\u003eNODEFONY V7\u003c/h1\u003e\n\n\n\n[![npm package](https://nodei.co/npm/nodefony.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/nodefony)\n\n[![Issues Status](https://img.shields.io/github/issues/nodefony/nodefony.svg)](https://github.com/nodefony/nodefony/issues) [![Build Status](https://github.com/nodefony/nodefony/workflows/nodefony/badge.svg)](https://github.com/nodefony/nodefony/actions) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/495/badge)](https://bestpractices.coreinfrastructure.org/projects/495)\n\nNodefony is Node.js full-stack web framework.\n\nNodefony can be used to develop a complete solution to create a Fullstack Web Application, Secure Api, or Microservices.\n\n\n## Note on Migration to TypeScript\n\n\u003e **Important:** This repository is undergoing a migration to TypeScript. You can follow the progress and contribute at [nodefony-core](https://github.com/nodefony/nodefony-core). During this period, this repository will receive only security updates for its packages.\n\n\n## Table of content\n\n-   [Features](#features)\n-   [Requirements](#requirements)\n-   [Linux OSX Installation](#install)\n-   [Windows Installation ](#installwin32)\n-   [Build Nodefony Project with CLI (Command Line Interface)](#buildcli)\n-   [Build Nodefony Project with STARTER](#buildstarter)\n-   [Start Development Mode](#start)\n-   [Start Production Mode](#start_prod)\n-   [Configurations](#configurations)\n-   [Quick Start](#bundles)\n-   [HTTPS Access](#https)\n-   [References / Thanks](#references--thanks)\n-   [Authors](#authors)\n-   [License](#license)\n-   [Demo](#demo)\n\n## \u003ca name=\"features\"\u003e\u003c/a\u003eNodefony features :\n\n-   Servers  ([http(s)](https://nodejs.org/dist/latest-v8.x/docs/api/https.html), [websocket(s)](https://github.com/theturtle32/WebSocket-Node), statics, sockjs)\n-   [HTTP2](https://nodejs.org/api/http2.html) ready node module provides an implementation of the HTTP/2 (push server ready).\n-   Dynamics routing\n-   ORM [Sequelize](http://docs.sequelizejs.com)\n-   ORM [mongoose](http://mongoosejs.com/index.html)\n-   Simple Databases Services connections (Redis, Mongo, Elasticsearch, mysql, sqlite ...).\n-   MVC Templating Server Side ([Twig](https://github.com/twigjs/twig.js))\n-   Notion of real-time context in Action Controller (websocket).\n-   Notion of synchronous or asynchronous execution in Action Controller (Promise, Async, Await).\n-   Services Containers, Dependency Injection (Design Patterns)\n-   Sessions Manager (ORM, Memcached)\n-   Authentication Manager (Digest, Basic, oAuth, Local, ldap, jwt, openid, passportjs)\n-   WAF ( Web application firewall )\n-   Cross-Origin Resource Sharing ([CORS](https://www.w3.org/TR/cors/))\n-   Production Management ([PM2](https://github.com/Unitech/pm2/))\n-   RealTime API ([Bayeux Protocol](http://autogrowsystems.github.io/faye-go/))\n-   Webpack Assets management (Like WDS with HMR hot module Replacement)\n-   C++ Addons (Binding in Bundle)\n-   Translations\n-   CLI (Command Line Interface)\n-   Monitororing , Debug Bar\n-   Unit Test Api in framework context ([MOCHA](https://mochajs.org/))\n\n**Nodefony assimilates into the ecosystem of node.js with services like** :\n\n-   [WEBPACK](https://webpack.js.org/) Module bundler for assets management of application .\n-   [SockJS](https://github.com/sockjs) Server ( Like WDS 'Webpack Dev Server' and HMR management )\n-   [WATCHER](https://nodejs.org/docs/latest/api/fs.html#fs_fs_watch_filename_options_listener) node.js for auto reload-files in developement mode .\n-   [PM2](http://pm2.keymetrics.io/) Production Process Manager for Node.js .\n-   [Passport](http://passportjs.org/) Simple, unobtrusive authentication for Node.js .\n-   ~~[Angular](https://github.com/angular/angular-cli) Experimental Bundle Generator ( Angular cli no longer allows the ejection of a webpack config)~~\n\n**Nodefony 7  adds the following features** :\n\n-   [React](https://github.com/facebookincubator/create-react-app) Experimental Bundle Generator ( Now an React Project can be merge into a Nodefony Bundle )\n-   [Vue.js](https://vuejs.org) Experimental Bundle Generator ( Now an Vue.js Project can be merge into a Nodefony Bundle )\n-   [Api swagger-ui](https://swagger.io/) ( Documentation Api with swagger and openapi AOS3)\n-   [Api graphql](https://graphql.org/) ( Documentation Api with graphiql)\n\n\nEvolution priorities for the next version will focus on robustness, unit testing, documentation and security.\n\nYou can follow Nodefony build with github actions at **\u003chttps://github.com/nodefony/nodefony/actions\u003e**\n\n## Nodefony Module Implementation\n\nNodefony implements modules with CommonJS and ECMAScript 6 (Class, Inheritance). The development framework has now decided to migrate to TypeScript to leverage its type-checking capabilities and improve code quality and maintainability. [nodefony-core](https://github.com/nodefony/nodefony-core). \n\nFor more information on TypeScript, see the [TypeScript documentation](https://www.typescriptlang.org/).\n\nThe proposal for type annotations in ECMAScript is still relevant and can be followed here: [proposal-type-annotations](https://github.com/tc39/proposal-type-annotations).\n\n\n## **Resources for Newcomers**\n\n#### -  **[Nodefony Starter Demo](https://nodefony.net)**\n\n#### -  **[Nodefony Github](https://github.com/nodefony/nodefony)**\n\n#### -  **[Nodefony Documentation](https://nodefony.net/documentation/nodefony)**\n\n#### Documentation in progress !!\n\n## \u003ca name=\"requirements\"\u003e\u003c/a\u003eRequirements\n\n#### On your system _you must have Installed_ :\n\n-   **[GIT](http://git-scm.com/)**  is Distributed version control system\n\n-   **[Node.js](https://nodejs.org/)** ® is a Platform built on Chrome's JavaScript runtime ( \u003e= 8 )\n\n-   **[npm](https://www.npmjs.com/)** or **[yarn](https://yarnpkg.com/lang/en/)** or **[pnpm](https://pnpm.io/cli/install)**  Packages Manager for javascript application\n\n-   **[nvm](https://github.com/nvm-sh/nvm/)**  Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions\n\n-   **[OpenSSL](https://www.openssl.org/)** Toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols\n\n-   **[GNU Bash](https://www.gnu.org/software/bash/)** Bash is the GNU Project's shell\n\n#### Operating Systems :\n\n-   LINUX\n    -   Debian, Ubuntu (Checked, Tested)\n    -   RASPBIAN Raspberry Pi (Checked)\n\n-   MACOS (Checked, Tested)\n\n-   WINDOWS (Checked)\n\n-   FreeBSD (Checked)\n    -   pkg install bash gmake gcc6\n    -   setenv CC \"/usr/local/bin/gcc\"\n    -   setenv CXX \"/usr/local/bin/g++\"\n    -   cd /usr/local/bin/ ;ln -s pythonx.x python\n\n-   ~~OpenBSD (Not Checked yet )~~\n\n-   ~~[ELECTRON](https://github.com/nodefony/nodefony-electron) Experimental Nodefony Electron  ( Now an Electron Context can be use in Nodefony Project )~~\n\n-   EMBEDDED SYSTEM ( Very difficult : large memory footprint )\n\n## \u003ca name=\"install\"\u003e\u003c/a\u003e Linux or OSX Installation\n\n**[NVM](https://github.com/nvm-sh/nvm#installation-and-update) Installation (Node Version Manager )** :\n -   [NVM](https://github.com/creationix/nvm) Node Version Manager - Simple bash script to manage multiple active node.js versions\n\n  To install or update nvm, you can use the install script:\n```sh\ncurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash\n# or\nwget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash\n\n$ source ~/.bashrc # or source ~/.bash_profile\n$ nvm ls-remote # show all remote versions\n$ nvm ls # show local versions\n```\n\n**[Node.js](https://nodejs.org/) Installation with [NVM](https://github.com/creationix/nvm)** :\n```sh\nnvm install node # \"node\" is an alias for the latest version\n```\n\n**[Nodefony](https://nodefony.net) Excutable Installation (Globally)** :\n\n```bash\nnpm -g install nodefony\n\n# or with yarn\n\nyarn global add nodefony\n```\n\n**Error that you can usually find** :\n\n- EACCES error  [See Global install How to Prevent Permissions Errors](https://docs.npmjs.com/getting-started/fixing-npm-permissions) (Reinstall npm with a Node Version Manager)\n- Different Node.js version (NODE_MODULE_VERSION XX) use 'nodefony rebuild'\n\n## \u003ca name=\"installwin32\"\u003e\u003c/a\u003e Windows Installation\n\n**[Node.js](https://nodejs.org/en/) Installation** :\n [nvm-windows](https://github.com/coreybutler/nvm-windows#node-version-manager-nvm-for-windows)\n to easily switch Node versions between different projects.\n or To install or update Node.js, you can download installer here [Node.js](https://nodejs.org/en/)\n\n**[Nodefony](https://nodefony.net)  Installation** :\n\nLaunch a CMD terminal\n```bash\nnpm -g install nodefony\n\n# or with yarn\n\nyarn global add nodefony\n```\n**Add NPM global bin in $Path windows** :\n\n  On the Windows System Property Menu, configure *Path* environment variable by adding :\n\n  ```bash\nC:\\Users\\myuser\\AppData\\Roaming\\npm\nor\nC:\\Users\\myuser\\AppData\\Roaming\\npm\\bin\n  ```\n\n## \u003ca name=\"usecli\"\u003e\u003c/a\u003e Use nodefony cli:\n\n**Cli command when use Global installation**\n```bash\n$ nodefony -v\n7.0.0\n```\n\n**Cli command when By using yarn or npm in trunk**\n```bash\n#Or by using yarn\nyarn run nodefony\n\n#Or by using npm\nnpm run nodefony\n```\n**By using npx**\n***note: npx is included with npm \u003e v5.2 or can be installed separately.***\n```bash\nnpx nodefony -v\n7.0.0-beta.10\n```\n\n**The long way with the full path**\n```bash\n./node_modules/.bin/nodefony\n#Or with the shortcut using npm bin\n$(npm bin)/nodefony\n```\n\n## \u003ca name=\"buildcli\"\u003e\u003c/a\u003e Build Project with nodefony cli (recommended):\n\n**Cli Usage INTERACTIVE MODE** :\n\nYOU CAN USE CLI INTERACTIVE MODE (nodefony without args) :\n```bash\n$ nodefony\n\n?  Nodefony CLI :  (Use arrow keys)\n❯ Create Nodefony Web Project\nCreate Micro Service Project\nPM2 Tools\n--------\nHelp\nQuit\n```\n**Cli Usage NO INTERRATIVE** :\n\nYOU CAN USE CLI NO INTERACTIVE (nodefony with args) :\n\n```bash\n#  CLI generate project name : myproject\n\n$ npx nodefony create myproject\n$ cd myproject\n ```\n\n**Cli Help** :\n\n```bash\n$ npx nodefony -h\n\nnodefony\n    create [-i] name [path]                       Create New Nodefony Project\n```\n\n## \u003ca name=\"buildstarter\"\u003e\u003c/a\u003e Build Project with Github Starter :\n\n**CLI** :\n\n  Clone nodefony starter\n ```bash\n $ git clone https://github.com/nodefony/nodefony-starter.git\n $ cd nodefony\n $ npx nodefony build\n   ...\n   ...\n $ npm start\n ```\n **CLI INTERATIVE** :\n\n  YOU CAN USE CLI INTERACTIVE MODE TO BUILD PROJECT (nodefony without args)\n ```bash\n $ git clone https://github.com/nodefony/nodefony-starter.git\n $ cd nodefony\n $ ls -l\n -rw-r--r--     1 cci  staff   21306 27 mar 19:22 README.md\n drwxr-xr-x    12 cci  staff     384 27 mar 19:25 app\n drwxr-xr-x     3 cci  staff      96 27 mar 19:22 bin\n drwxr-xr-x     7 cci  staff     224 27 mar 19:26 config\n drwxr-xr-x     3 cci  staff      96 27 mar 19:22 doc\n drwxr-xr-x  1342 cci  staff   42944 27 mar 19:24 node_modules\n -rw-r--r--     1 cci  staff     997 27 mar 19:22 package.json\n drwxr-xr-x     3 cci  staff      96 27 mar 19:22 src\n drwxr-xr-x     4 cci  staff     128 29 mar 11:13 tmp\n drwxr-xr-x    12 cci  staff     384 29 mar 11:01 web\n -rw-r--r--     1 cci  staff  542660 27 mar 19:24 yarn.lock\n\n $ npx nodefony\n\n?  Nodefony CLI :  (Use arrow keys)\n❯ Build Project\n  Generater\n  Tools\n  PM2 Tools\n  --------\n  Help\n  Quit\n ```\n\n## \u003ca name=\"start\"\u003e\u003c/a\u003eServing a Nodefony project via an development server\n\n**Starting Development Servers** :\n\n```bash\n$ npx nodefony dev\n\n# TO STOP\n$ \u003cctrl-c\u003e\n```\n**Starting Development Servers in Debug Mode (-d)** :\n\n```bash\n$ npx nodefony -d dev\n\n# TO STOP\n$ \u003cctrl-c\u003e\n```\n\nOR YOU CAN USE CLI INTERACTIVE MODE (nodefony without args)\n```bash\n _   _    ___    ____    _____   _____    ___    _   _  __   __\n| \\ | |  / _ \\  |  _ \\  | ____| |  ___|  / _ \\  | \\ | | \\ \\ / /\n|  \\| | | | | | | | | | |  _|   | |_    | | | | |  \\| |  \\ V /\n| |\\  | | |_| | | |_| | | |___  |  _|   | |_| | | |\\  |   | |\n|_| \\_|  \\___/  |____/  |_____| |_|      \\___/  |_| \\_|   |_|\n\nVersion : 4.0.0 Platform : linux  Process : nodefony PID : 31635\n\nFri Jul 27 2018 17:01:11 INFO nodefony : WELCOME PROJECT : myproject 1.0.0\n\n?  Nodefony CLI :\n❯ Start Servers Development\n  Start Servers Pre-Production\n  Start Servers Production\n  Install Project\n  Rebuild Project\n  Generater\n  Tools\n  PM2 Tools\n  Run Test\n  --------\n  Help\n  Quit\n```\n\n**Starting Development Servers in Inspector mode (--inspect)** :\n\n[Nodejs Debugging Guide](https://nodejs.org/en/docs/guides/debugging-getting-started)\n```bash\n$ npm -g install npx\n\n$ npx --node-arg=--inspect nodefony dev\n// new version npx \u003e 7\n$ npx --node-options=--inspect nodefony dev\n\n# check chrome://inspect in your browser\n```\n\n## \u003ca name=\"start_prod\"\u003e\u003c/a\u003eServing a Nodefony Project via a Production server :\n\n**Starting a Nodefony project with [PM2](http://pm2.keymetrics.io/)** :\n```bash\n$ npx nodefony prod\nor\n$ npx nodefony start\n```\nTools PM2 You can see PM2 config : config/pm2.config.js\n```bash\n# To See log\n$ npx nodefony logs\n\n# To List Status of Production projects\n$ npx nodefony list\n\n# TO KILL PM2 DEAMON\n$ npx nodefony kill\n\n# TO STOP APPLICATION WITHOUT KILL PM2 DEAMON\n$ npx nodefony stop\n\n# YOU can use all pm2 command by using\n$ yarn pm2 monit\n$ yarn pm2 [list|ls|status]\n$ yarn pm2 stop all\nor\n$ npm run pm2 logs --lines 200\n```\n\n**Checking a Nodefony Project Pre-Production (Usefull to check Clusters Node)** :\n```bash\n$ npx nodefony preprod\n```\n\n## \u003ca name=\"https\"\u003e\u003c/a\u003eServing a Nodefony project with HTTPS or WSS\n\nBy default nodefony listen secure port in 5152 @see config/config.js\n\nDuring the installation process all the openssl parts were generated ( self-signed localhost certificate ).\n\nYou can Change default openssl configuration in :\n```bash\nls -l config/openssl\n\n├── ca\n│   └── openssl.cnf\n└── ca_intermediate\n    └── openssl.cnf\n```\nYou must Add a Trusted CA in your Browser : projectName-root-ca.crt.pem\nYou can find certificate authority (ca) here:\n\n    config/certificates/ca/projectName-root-ca.crt.pem\n\n#### Access to Secure App with URL : \u003chttps://localhost:5152\u003e\n#### Access to App with URL : \u003chttp://localhost:5151\u003e\n\n[![nodefony](https://raw.githubusercontent.com/nodefony/nodefony/master/src/nodefony/bundles/monitoring-bundle/Resources/public/images/nodefony.png)](https://nodefony.net)\n\n## \u003ca name=\"configurations\"\u003e\u003c/a\u003eFramework Configurations\n\nOpen **[config/config.js](https://github.com/nodefony/nodefony/blob/master/config/config.js)**  if you want change httpPort, domain ,servers, add bundle, locale ...\n\n```js\n/**\n *  NODEFONY FRAMEWORK\n *\n *       KERNEL CONFIG\n *\n *   Domain listen : Nodefony can listen only one domain ( no vhost )\n *     Example :\n *      domain :  0.0.0.0      // for all interfaces\n *      domain :  [::1]        // for IPV6 only\n *      domain :  192.168.1.1  // IPV4\n *      domain :  mydomain.com // DNS\n *\n *   Domain Alias : string only \"\u003c\u003cregexp\u003e\u003e\" use domainCheck : true\n *     Example :\n *      domainAlias:[\n *        \"^127.0.0.1$\",\n *        \"^localhost$\",\n *        \".*\\\\.nodefony\\\\.com\",\n *        \"^nodefony\\\\.eu$\",\n *        \"^.*\\\\.nodefony\\\\.eu$\"\n *      ]\n */\nconst path = require(\"path\");\n\nmodule.exports = {\n  system: {\n    domain: \"0.0.0.0\",\n    domainAlias: [\n      \"^127.0.0.1$\",\n      \"^localhost$\"\n    ],\n    httpPort: 5151,\n    httpsPort: 5152,\n    domainCheck: false,\n    locale: \"en_en\",\n    /**\n     * BUNDLES CORE\n     */\n    security: true,\n    realtime: true,\n    monitoring: true,\n    mail: true,\n    documentation: false,\n    unitTest: true,\n    redis: false,\n    mongo: false,\n    elastic: false,\n    /**\n     * SERVERS\n     */\n    servers: {\n      statics: true,\n      protocol: \"2.0\", //  2.0 || 1.1\n      http: true,\n      https: true,\n      ws: true,\n      wss: true,\n      certificats: {\n        key: path.resolve(\"config\", \"certificates\", \"server\", \"privkey.pem\"),\n        cert: path.resolve(\"config\", \"certificates\", \"server\", \"fullchain.pem\"),\n        ca: path.resolve(\"config\", \"certificates\", \"ca\", \"nodefony-root-ca.crt.pem\"),\n        options: {\n          rejectUnauthorized: true\n        }\n      }\n    },\n    /**\n     * DEV SERVER\n     */\n    devServer: {\n      inline: true,\n      hot: false,\n      hotOnly: false,\n      overlay: true,\n      logLevel: \"info\", // none, error, warning or info\n      progress: false,\n      protocol: \"https\",\n      websocket: true\n    },\n    /**\n     *  BUNDLES LOCAL REGISTRATION\n     *    Example :\n     *       bundles: {\n     *         hello-bundle : \"file:src/bundles/hello-bundle\",\n     *         test-bundle  : path.resolve(\"src\",\"bundles\",\"test-bundle\")\n     *       }\n     */\n    bundles: {}\n    ...\n```\n\n## \u003ca name=\"bundles\"\u003e\u003c/a\u003eQuick Start\n\n### Install Nodefony :\n```\n$ npm -g install nodefony\n```\n[See Global install How to Prevent Permissions Errors](https://docs.npmjs.com/getting-started/fixing-npm-permissions)\n\n### Create Project :\n```\n$ nodefony create myproject\n$ cd myproject\n```\n\n### Generating a New Bundle :\n\nCLI Generate new bundle : default path src/bundles\n\n```bash\n$ nodefony generate:bundle name [path]\n\n# Or Generate a New Bundle Interactive\n$ nodefony\n\n?  Nodefony CLI :  Generater\n?  Nodefony CLI :  (Use arrow keys)\n❯ Generate New Bundle\n  Generate New Controller\n  Generate New Service\n  Generate New Entity\n  Generate New Nodefony Project\n  Generate Openssl Certificates\n  Generate Haproxy Configuration\n  Generate Nginx Configuration\n  Generate letsEncrypt Webroot Configuration\n  --------\n  Quit\n```\n\n### Starting Servers to check new Bundle hello:\n\n```bash\n$ npm start\nor\n$ nodefony dev\n```\nAccess to bundle route with URL : \u003chttp://localhost:5151/hello\u003e\n\nAccess to bundle route with URL : \u003chttps://localhost:5152/hello\u003e\n\n#### Now hello-bundle is auto-insert in framework with watcher active and auto-config Webpack Module bundler\n\n### Example controller  : src/bundles/hello-bundle/controller/defaultController.js\n\n```js\n/**\n *\t@class defaultController\n *\t@constructor\n *\t@param {class} container\n *\t@param {class} context\n *  @Route (\"/hello\")\n */\nclass defaultController extends nodefony.Controller {\n\n  constructor(container, context) {\n    super(container, context);\n    // start session\n    this.startSession();\n  }\n\n/**\n *    @Route (\"\",\n *      name=\"hello-route\")\n */\n  indexAction() {\n    return this.render(\"hello-bundle::index.html.twig\", {\n\t\t\tname: this.bundle.name,\n\t\t\tdescription: this.bundle.package.description\n    });\n  }\n}\n\nmodule.exports = defaultController;\n```\n\n### Example view (twig) : src/bundles/hello-bundle/Resources/views/index.html.twig\n\n```twig\n{% extends './base.html.twig' %}\n{% set error = getFlashBag(\"error\") %}\n{% set info = getFlashBag(\"info\") %}\n{% block body %}\n  \u003cdiv class=\"hello\"\u003e\n    \u003cimg class=displayed src=/framework-bundle/images/nodefony-logo.png\u003e\n    \u003ch1\u003e{{ name }}\u003c/h1\u003e\n    \u003ch2\u003e{{ description }}\u003c/h2\u003e\n    \u003cimg class=\"displayed\"  style=\" width:10%; height:10%\" src=\"/framework-bundle/images/nodejs/nodejs-new-pantone-black.png\"\u003e\n    \u003cimg class=\"displayed\" style=\" width:15%; height:15%\" src=\"/framework-bundle/images/webpack/webpack.svg\"\u003e\n  \u003c/div\u003e\n{% endblock %}\n\n```\n\n### watchers :\n\n#### The bundle generation engine build bundle config with  node.js watcher configuration\n\n#### In developement mode  is very usefull to auto-reload files as controllers , views , routing , translations\n\n#### without having to reboot the server.\n\nYou can see hello-bundle config   : src/bundles/hello-bundle/Resources/config/config.js\n\n```js\nmodule.exports = {\n  locale      : \"en_en\",\n  /**\n   *    WATCHERS\n   *\n   *  watchers Listen to changes, deletion, renaming of files and directories\n   *  of different components\n   *\n   *  For watch all components\n   *      watch:                    true\n   *  or\n   *      watch:{\n   *        controller:             true,\n   *        config:                 true,        // only routing and services\n   *        views:                  true,\n   *        translations:           true,\n   *        webpack:                true\n   *      }\n   *\n   */\n  watch: true,\n\n  /**\n   * DEV SERVER\n   */\n  devServer: {\n    hot: false\n  }\n};\n```\n\n### Webpack Module bundler :\n\n#### The bundle generation engine build bundle config with a predefined webpack configuration\n\n#### In this way webpack is very usefull to manage all assets of bundle\n\n#### In developement mode watch  is very usefull to auto-compile webpack module bundle\n\n#### without having to reboot the server\n\nYou can see hello-bundle config webpack : src/bundles/hello-bundle/Resources/config/webpack.config.js\n\n```js\n// Default context \u003cbundle base directory\u003e\n//const context = path.resolve(__dirname, \"..\", \"public\");\nconst public = path.resolve(__dirname, \"..\", \"public\", \"assets\");\nconst publicPath = \"/hello-bundle/assets/\";\nlet wpconfig = null;\nlet dev = true;\nif (kernel.environment === \"dev\") {\n  wpconfig = require(\"./webpack/webpack.dev.config.js\");\n} else {\n  wpconfig = require(\"./webpack/webpack.prod.config.js\");\n  dev = false;\n}\n\nmodule.exports = webpackMerge(config, {\n  //context: context,\n  target: \"web\",\n  entry: {\n    hello:[\"./Resources/js/hello.js\"]\n  },\n  output: {\n    path: public,\n    publicPath: publicPath,\n    filename: \"./js/[name].js\",\n    library: \"[name]\",\n    libraryExport: \"default\"\n  },\n  externals: {...},\n  resolve: {...},\n  module: {...},\n  plugins: [...],\n  devServer: {\n    inline: true,\n    hot: false\n  }\n});\n```\n\n## \u003ca name=\"monitoring\"\u003e\u003c/a\u003eMonitoring FRAMEWORK\n\nAccess to monitoring route with URL : \u003chttp://localhost:5151/nodefony\u003e\n\n[![MONITORING](https://raw.githubusercontent.com/nodefony/nodefony/master/src/nodefony/bundles/monitoring-bundle/Resources/public/images/monitor.png)](https://nodefony.net/nodefony)\n\nMonitoring in progress !!!\n\n## Who Use Nodefony:\n\n\u003cp float=\"left\"\u003e\n  \u003ca href=\"https://www.sfr.fr\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/nodefony/nodefony/master/tools/images/sfr.jpg\"/\u003e\n  \u003c/a\u003e\n  \u0026nbsp\u0026nbsp\u0026nbsp\u0026nbsp\u0026nbsp\n  \u003ca href=\"https://www.sfr.fr\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/nodefony/nodefony/master/tools/images/logo.png\"/\u003e\n  \u003c/a\u003e\n  \u0026nbsp\u0026nbsp\u0026nbsp\u0026nbsp\u0026nbsp\n  \u003ca href=\"https://www.d-lake.fr\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/nodefony/nodefony/dev/tools/images/d-lake.png\"/\u003e\n  \u003c/a\u003e\n  \u0026nbsp\u0026nbsp\u0026nbsp\u0026nbsp\u0026nbsp\n  \u003ca href=\"https://emersya.com\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/nodefony/nodefony/dev/tools/images/emersya.png\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Big thanks:\n  - [D-Lake](https://www.d-lake.fr/) French specialist in infrastructure and data security.\n  - [Emersya](https://emersya.com) Emersya has pioneered a unique way of interacting with products online using 3D technology.\n## Related Links:\n\n-   [Node.js](https://nodejs.org/)\n-   [npm](https://www.npmjs.com/)\n-   [Framework Symfony](http://symfony.com/)\n-   [Twig.js](https://github.com/justjohn/twig.js/wiki)\n-   [PM2](https://github.com/Unitech/PM2/blob/master/ADVANCED_README.md)\n-   [WEBPACK](https://webpack.js.org/)\n\nMore informations  **[Nodefony Documentation](https://nodefony.net/documentation)**\n\n## \u003ca name=\"authors\"\u003e\u003c/a\u003eAuthors\n\n-   Christophe CAMENSULI  [github/ccamensuli](https://github.com/ccamensuli)\n\n## \u003ca name=\"license\"\u003e\u003c/a\u003eLicense\n\n[CeCILL-B](https://github.com/nodefony/nodefony/blob/master/LICENSE)\n\n## \u003ca name=\"demo\"\u003e\u003c/a\u003eDemo\n\n[Demo](https://nodefony.net)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodefony%2Fnodefony","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodefony%2Fnodefony","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodefony%2Fnodefony/lists"}