@blaasvaer/frmwrk 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/controllers.js +1 -0
- package/index.js +2 -2
- package/models.js +1 -0
- package/package.json +1 -1
package/controllers.js
CHANGED
|
@@ -23,6 +23,7 @@ function installControllers ( config ) {
|
|
|
23
23
|
if ( controller ) {
|
|
24
24
|
if ( typeof controller.install === 'function' ) {
|
|
25
25
|
// Add controller if it exports install
|
|
26
|
+
this.controllers = {};
|
|
26
27
|
this.controllers[ file.split('.')[0] ] = controller;
|
|
27
28
|
|
|
28
29
|
// Trigger install script for controller
|
package/index.js
CHANGED
|
@@ -50,7 +50,7 @@ if ( process.env.NODE_ENV !== 'production') {
|
|
|
50
50
|
FW = function ( config ) {
|
|
51
51
|
_config = config || {};
|
|
52
52
|
|
|
53
|
-
hostname =
|
|
53
|
+
hostname = config.hostname ? config.hostname : '0.0.0.0';
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* Set the Controller
|
|
@@ -130,7 +130,7 @@ console.log("Authorize - check credentials:", credentials);
|
|
|
130
130
|
* Create and start the server
|
|
131
131
|
* @return {function} Server instance
|
|
132
132
|
*/
|
|
133
|
-
|
|
133
|
+
http.createServer( handleRequest ).listen(port, hostname, () => {
|
|
134
134
|
console.log(`Server running at http://${hostname}:${port}`);
|
|
135
135
|
});
|
|
136
136
|
|
package/models.js
CHANGED