Skip to content

Commit

Permalink
Added better default to content server root
Browse files Browse the repository at this point in the history
  • Loading branch information
inolen committed Aug 27, 2013
1 parent fdd9fdd commit 2ae9521
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
8 changes: 5 additions & 3 deletions bin/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var argv = require('optimist')
},
'root': {
'description': 'Root assets path',
'demand': true
'default': path.join(__dirname, '..', 'assets')
},
'port': {
'description': 'Server port',
Expand Down Expand Up @@ -102,7 +102,7 @@ function getModFiles(mod, callback) {
}

function generateManifest(callback) {
console.log('generating manifest..');
console.log('generating manifest from ' + argv.root);

getMods(function (err, mods) {
if (err) return callback(err);
Expand Down Expand Up @@ -186,9 +186,11 @@ function handlePak(req, res, next) {

function loadConfig() {
if (!argv.config) {
return;
return null;
}

var config = {};

try {
console.log('Loading config file from ' + argv.config + '..');
var data = require(argv.config);
Expand Down
4 changes: 3 additions & 1 deletion bin/master.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,11 @@ function connection(ws) {

function loadConfig() {
if (!argv.config) {
return;
return null;
}

var config = {};

try {
console.log('Loading config file from ' + argv.config + '..');
var data = require(argv.config);
Expand Down
2 changes: 1 addition & 1 deletion ioq3
Submodule ioq3 updated from aaad90 to 5beb72

0 comments on commit 2ae9521

Please sign in to comment.