Getting Started with Nodefony


NODEFONY INSTALLATION : See more ( Nodefony installation documentation )

$ git clone https://github.com/nodefony/nodefony.git

$ cd nodefony

$ make build

Configuration system :

If you want change domain other than localhost or an other interface ip binding
Change and Add host name "mydomain.com" in your /etc/hosts :

$ sudo vim /etc/hosts

##
# Host Database
#
##

#  LOOPBACK
127.0.0.1       localhost mydomain.com

#  OR LAN IP

192.168.x.x	mydomain.com

#  OR WAN IP

209.x.x.x	mydomain.com
	

Configuration Framework : See more ( Nodefony Configurations documentation )

If you have change domain other than localhost or you want change http(s) port binding
Change in Location : ./config/config.yml :

#
#  NODEFONY FRAMEWORK
#
#       KERNEL CONFIG
#
#
system:
  domain                        : mydomain.com        	# nodefony can listen only one domain ( no vhost )  /    [::1] for IPV6 only
  domainAlias:                                          # domainAlias string only regex  example .*\\.nodefony\\.com  ^nodefony\\.eu$ ^.*\\.nodefony\\.eu$
    - "^www.mydomain.com$"
  httpPort                      : 5151
  httpsPort                     : 5152

	

Running NODEFONY: See more ( RUN Nodefony documentation )

There are 3 methods to run NODEFONY framework

  • Run Appliation in DEVELOPEMENT mode ./nodefony dev
  • Run Appliation in PRE PRODUCTION mode with clusters ./nodefony prod
  • Run Appliation in PRODUCTION PM2 MANAGEMENT mode make start or ./nodefony pm2 see PM2
To check the good binding http(s) you can run nodefony in dev mode

# Run Appliation in DEVELOPEMENT mode
$ ./nodefony dev
# Run Appliation in DEVELOPEMENT mode  with debug
$ ./nodefony -d dev

Console when you start nodefony in developement mode :

$ ./nodefony dev
    _   _    ___    ____    _____   _____    ___    _   _  __   __
   | \ | |  / _ \  |  _ \  | ____| |  ___|  / _ \  | \ | | \ \ / /
   |  \| | | | | | | | | | |  _|   | |_    | | | | |  \| |  \ V /
   | |\  | | |_| | | |_| | | |___  |  _|   | |_| | | |\  |   | |
   |_| \_|  \___/  |____/  |_____| |_|      \___/  |_| \_|   |_|


	Version : 3.0.0-beta Platform : darwin Process : nodefony PID : 86526


  NODEFONY SERVER Cluster : master Environment : dev Debug :false

Wed Aug 02 2017 10:10:00 INFO SERVICE CLI KERNEL  : INSTALL ASSETS LINK IN WEB PUBLIC DIRECTORY  : /Users/cci/repository/nodefony/web/
Wed Aug 02 2017 10:10:00 INFO SERVICE CLI KERNEL  : INSTALL LINK IN /web TOTAL SIZE : 27 MB
┌───────────────┬───────────────────────────┬───────────────────────────────────────────────────────────────────────────────────┬─────────┬────────────────┐
│ BUNDLES       │ DESTINATION PATH          │ SOURCE PATH                                                                       │ SIZE    │ ASSETS COMPILE │
├───────────────┼───────────────────────────┼───────────────────────────────────────────────────────────────────────────────────┼─────────┼────────────────┤
│ framework     │ ./web/frameworkBundle     │ ./node_modules/nodefony/src/nodefony/bundles/frameworkBundle/Resources/public     │ 1.2 MB  │ 2.4 MB         │
├───────────────┼───────────────────────────┼───────────────────────────────────────────────────────────────────────────────────┼─────────┼────────────────┤
│ security      │ ./web/securityBundle      │ ./node_modules/nodefony/src/nodefony/bundles/securityBundle/Resources/public      │ 1.9 KB  │ 0 bytes        │
├───────────────┼───────────────────────────┼───────────────────────────────────────────────────────────────────────────────────┼─────────┼────────────────┤
│ monitoring    │ ./web/monitoringBundle    │ ./node_modules/nodefony/src/nodefony/bundles/monitoringBundle/Resources/public    │ 720 KB  │ 3.9 MB         │
├───────────────┼───────────────────────────┼───────────────────────────────────────────────────────────────────────────────────┼─────────┼────────────────┤
│ documentation │ ./web/documentationBundle │ ./node_modules/nodefony/src/nodefony/bundles/documentationBundle/Resources/public │ 644 KB  │ 3.5 MB         │
├───────────────┼───────────────────────────┼───────────────────────────────────────────────────────────────────────────────────┼─────────┼────────────────┤
│ unitTest      │ ./web/unitTestBundle      │ ./node_modules/nodefony/src/nodefony/bundles/unitTestBundle/Resources/public      │ 0 bytes │ 0 bytes        │
├───────────────┼───────────────────────────┼───────────────────────────────────────────────────────────────────────────────────┼─────────┼────────────────┤
│ demo          │ ./web/demoBundle          │ ./src/bundles/demoBundle/Resources/public                                         │ 25 MB   │ 5.0 MB         │
├───────────────┼───────────────────────────┼───────────────────────────────────────────────────────────────────────────────────┼─────────┼────────────────┤
│ App           │ ./web/app                 │ ./app/Resources/public                                                            │ 3.8 KB  │ 1.6 MB         │
└───────────────┴───────────────────────────┴───────────────────────────────────────────────────────────────────────────────────┴─────────┴────────────────┘
Wed Aug 02 2017 10:10:01 INFO SERVICE WEBPACK   : RUN WEBPACK COMPILER : webpack.dev.config.js COMPILE ENTRY POINT :
┌───────────────────┬───────────────────────┬───────────────────────┬─────────────────────┬───────────────┬────────────────────────────────────────────────────────────────────────┬─────────┐
│ ENTRY NAME [name] │ ENTRY                 │ OUTPUT FILE NAME      │ OUTPUT LIBRARY NANE │ OUTPUT TARGET │ PUBLIC PATH                                                            │ WATCHER │
├───────────────────┼───────────────────────┼───────────────────────┼─────────────────────┼───────────────┼────────────────────────────────────────────────────────────────────────┼─────────┤
│ layout            │ ./js/layout.js        │ ./assets/js/[name].js │ [name]              │ umd           │ /Users/cci/repository/nodefony/src/bundles/demoBundle/Resources/public │         │
├───────────────────┼───────────────────────┼───────────────────────┼─────────────────────┼───────────────┼────────────────────────────────────────────────────────────────────────┼─────────┤
│ demo              │ ./js/index.js         │ ./assets/js/[name].js │ [name]              │ umd           │ /Users/cci/repository/nodefony/src/bundles/demoBundle/Resources/public │         │
├───────────────────┼───────────────────────┼───────────────────────┼─────────────────────┼───────────────┼────────────────────────────────────────────────────────────────────────┼─────────┤
│ finder            │ ./js/finder/finder.js │ ./assets/js/[name].js │ [name]              │ umd           │ /Users/cci/repository/nodefony/src/bundles/demoBundle/Resources/public │         │
├───────────────────┼───────────────────────┼───────────────────────┼─────────────────────┼───────────────┼────────────────────────────────────────────────────────────────────────┼─────────┤
│ login             │ ./js/login.js         │ ./assets/js/[name].js │ [name]              │ umd           │ /Users/cci/repository/nodefony/src/bundles/demoBundle/Resources/public │         │
├───────────────────┼───────────────────────┼───────────────────────┼─────────────────────┼───────────────┼────────────────────────────────────────────────────────────────────────┼─────────┤
│ audio             │ ./webaudio/js/mix2.js │ ./assets/js/[name].js │ [name]              │ umd           │ /Users/cci/repository/nodefony/src/bundles/demoBundle/Resources/public │         │
└───────────────────┴───────────────────────┴───────────────────────┴─────────────────────┴───────────────┴────────────────────────────────────────────────────────────────────────┴─────────┘
Wed Aug 02 2017 10:10:01 INFO SERVICE WATCHER   : INITIALISE WATCHING  PATH : /Users/cci/repository/nodefony/app/controller
Wed Aug 02 2017 10:10:01 INFO SERVICE WATCHER   : INITIALISE WATCHING  PATH : /Users/cci/repository/nodefony/app/Resources/views
Wed Aug 02 2017 10:10:01 INFO SERVICE WATCHER   : INITIALISE WATCHING  PATH : /Users/cci/repository/nodefony/app/Resources/translations
Wed Aug 02 2017 10:10:01 INFO SERVICE WATCHER   : INITIALISE WATCHING  PATH : /Users/cci/repository/nodefony/app/config
Wed Aug 02 2017 10:10:01 INFO SERVICE sockjs   : Add sock-js compiler  : SOCKJS_app
Wed Aug 02 2017 10:10:01 INFO SERVICE sequelize CONNECTION  :  Sequelise Connection : nodefony has been established successfully  Type =sqlite  Database = /app/Resources/databases/nodefony.db
Wed Aug 02 2017 10:10:01 INFO SERVICE sockjs   :  Create sockjs server :   HTTPS
Wed Aug 02 2017 10:10:01 INFO BUNDLE MONITORING  : ADD DEBUG BAR MONITORING
Wed Aug 02 2017 10:10:01 INFO SERVICE STATICS   : Listen Server static rootDir  ==> /Users/cci/repository/nodefony/web
Wed Aug 02 2017 10:10:01 INFO MEMORY rss  : MEMORY POST READY  ( Resident Set Size ) PID ( 86526 ) : 147 MB
Wed Aug 02 2017 10:10:01 INFO MEMORY heapTotal  : MEMORY POST READY  ( Total Size of the Heap ) PID ( 86526 ) : 112 MB
Wed Aug 02 2017 10:10:01 INFO MEMORY heapUsed  : MEMORY POST READY  ( Heap actually Used ) PID ( 86526 ) : 85 MB
Wed Aug 02 2017 10:10:01 INFO MEMORY external  : MEMORY POST READY  PID ( 86526 ) : 212 KB
Wed Aug 02 2017 10:10:01 INFO SERVICE MONITORING   : Create server MONITORING listen on Domain : localhost Port : 1318
Wed Aug 02 2017 10:10:01 INFO SERVICE REALTIME  : Create server DMSG listen on Domain : localhost Port : 1316
Wed Aug 02 2017 10:10:01 INFO SERVICE REALTIME  : Create server RANDOM listen on Domain : localhost Port : 1315
Wed Aug 02 2017 10:10:01 INFO SERVICE HTTP   : HTTP  Server is listening on DOMAIN : http://localhost:5151
Wed Aug 02 2017 10:10:01 INFO SERVICE WEBSOCKET   :  Server is listening on DOMAIN : ws://localhost:5151
Wed Aug 02 2017 10:10:01 INFO SERVICE HTTPS   : HTTPS  Server is listening on DOMAIN : https://localhost:5152
Wed Aug 02 2017 10:10:01 INFO SERVICE WEBSOCKET SECURE   :  Server  is listening on DOMAIN : wss://localhost:5152
Wed Aug 02 2017 10:10:07 INFO SERVICE WEBPACK   : COMPILE SUCCESS BUNDLE : demoBundle webpack.dev.config.js
Wed Aug 02 2017 10:10:08 INFO SERVICE WEBPACK   : RUN WEBPACK COMPILER : app COMPILE ENTRY POINT :
┌───────────────────┬───────────────────────────────────────────────────────────────┬───────────────────────┬─────────────────────┬───────────────┬─────────────────────────────────────────────────────┬─────────┐
│ ENTRY NAME [name] │ ENTRY                                                         │ OUTPUT FILE NAME      │ OUTPUT LIBRARY NANE │ OUTPUT TARGET │ PUBLIC PATH                                         │ WATCHER │
├───────────────────┼───────────────────────────────────────────────────────────────┼───────────────────────┼─────────────────────┼───────────────┼─────────────────────────────────────────────────────┼─────────┤
│ app               │ ./js/app.js,webpack-dev-server/client?https://localhost:5152/ │ ./assets/js/[name].js │ [name]              │ umd           │ /Users/cci/repository/nodefony/app/Resources/public │ true    │
└───────────────────┴───────────────────────────────────────────────────────────────┴───────────────────────┴─────────────────────┴───────────────┴─────────────────────────────────────────────────────┴─────────┘
Wed Aug 02 2017 10:10:08 INFO SERVICE WEBPACK   : WATCHING BUNDLE : app webpack.dev.config.js
Wed Aug 02 2017 10:10:08 INFO SERVICE WEBPACK   : Hash: 685049051a75d34832df
Version: webpack 3.4.1
Time: 6802ms
		 Asset       Size  Chunks                    Chunk Names
./assets/js/app.js     325 kB       0  [emitted]  [big]  app
./assets/css/app.css  154 bytes       0  [emitted]         app
./assets/js/app.js.map     392 kB       0  [emitted]         app
./assets/css/app.css.map   97 bytes       0  [emitted]         app
[35] multi ./js/app.js webpack-dev-server/client?https://localhost:5152/ 40 bytes {0} [built]
[36] ./app/Resources/public/js/app.js 426 bytes {0} [built]
[37] ./app/Resources/public/css/app.css 41 bytes {0} [built]
[38] (webpack)-dev-server/client?https://localhost:5152/ 5.83 kB {0} [built]
[39] ./node_modules/url/url.js 23.3 kB {0} [built]
[41] ./node_modules/url/util.js 314 bytes {0} [built]
[42] ./node_modules/querystring-es3/index.js 127 bytes {0} [built]
[45] ./node_modules/strip-ansi/index.js 161 bytes {0} [built]
[46] ./node_modules/ansi-regex/index.js 135 bytes {0} [built]
[47] ./node_modules/loglevel/lib/loglevel.js 6.74 kB {0} [built]
[48] (webpack)-dev-server/client/socket.js 856 bytes {0} [built]
[80] (webpack)-dev-server/client/overlay.js 3.6 kB {0} [built]
[85] (webpack)/hot nonrecursive ^\.\/log$ 170 bytes {0} [built]
[87] (webpack)/hot/emitter.js 77 bytes {0} [built]
[88] ./node_modules/events/events.js 8.33 kB {0} [built]
+ 75 hidden modules
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js!app/Resources/public/css/app.css:
[0] ./node_modules/css-loader!./app/Resources/public/css/app.css 297 bytes {0} [built]
[1] ./node_modules/css-loader/lib/css-base.js 2.26 kB {0} [built]

ACCEES NODEFONY APPLICATION :

Access to App with URL : http://mydomain.com:5151
By default the nodefony clone come with a demonstration bundle named "demoBundle"