Skip to content

Commit

Permalink
chore(build): use config.json for server settings
Browse files Browse the repository at this point in the history
  • Loading branch information
btford committed Jan 12, 2015
1 parent 49a28ff commit 8199339
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
4 changes: 4 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,9 @@
"typeAssertionModule": "assert",
"annotations": true,
"sourceMaps": true
},
"server": {
"host": "0.0.0.0",
"port": 8000
}
}
10 changes: 6 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ var rename = require('gulp-rename');

var modulate = require('./scripts/angular-modulate');


var TRACEUR_OPTIONS = require('./config').traceur;
var BUILD_DIR = require('./config').build.dir;
var CONFIG = require('./config');
var SERVER_CONFIG = CONFIG.server;
var TRACEUR_OPTIONS = CONFIG.traceur;
var BUILD_DIR = CONFIG.build.dir;
var PATH = {
SRC: './src/**/*.ats'
};
Expand Down Expand Up @@ -46,8 +47,9 @@ gulp.task('watch', function() {
// WEB SERVER
gulp.task('serve', function() {
connect.server({
host: SERVER_CONFIG.host,
root: [__dirname],
port: 8000,
port: SERVER_CONFIG.port,
livereload: false
});
});
Expand Down
4 changes: 3 additions & 1 deletion protractor.conf.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
var SERVER_CONFIG = require('./config').server;

exports.config = {
allScriptsTimeout: 11000,

Expand All @@ -9,7 +11,7 @@ exports.config = {
'browserName': 'chrome'
},

baseUrl: 'http://localhost:8000/',
baseUrl: 'http://' + SERVER_CONFIG.host + ':' + SERVER_CONFIG.port + '/',

framework: 'jasmine',

Expand Down

0 comments on commit 8199339

Please sign in to comment.