Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Server host config parameter

  • Loading branch information...
commit 6668e44e822d416c408383bab9a02925dfb29ad4 1 parent 5a9bbc9
@cmfatih authored
Showing with 7 additions and 7 deletions.
  1. +1 −0  config/app.json
  2. +6 −7 services/httpd/server.js
View
1  config/app.json
@@ -10,6 +10,7 @@
},
"hapi": {
"server": {
+ "host": "localhost",
"port": 12080,
"options": {
"state": {
View
13 services/httpd/server.js
@@ -14,18 +14,17 @@ var mHapi = require('hapi');
exports = module.exports = function(iParam) {
// Init vars
- var iConfig = (iParam && iParam.config) ? iParam.config : null,
+ var iConfig = (iParam && iParam.config) ? iParam.config : null,
+ configHapi = (iConfig && iConfig.hapi) ? iConfig.hapi : null,
- serverInst, // server instance
- serverError, // server error
-
- configHapi = (iConfig && iConfig.hapi) ? iConfig.hapi : null
+ serverInst, // server instance
+ serverError // server error
;
// Init server
- serverInst = new mHapi.createServer('localhost', configHapi.server.port, configHapi.server.options);
+ serverInst = new mHapi.createServer(configHapi.server.host, configHapi.server.port, configHapi.server.options);
- serverInst.pack.allow({ext: true}).require('yar', configHapi.yar.options, function(err) {
+ serverInst.pack.require('yar', configHapi.yar.options, function(err) {
if(err) serverError = (err || "Unexpected error! (hapi.yar)");
});
Please sign in to comment.
Something went wrong with that request. Please try again.