Node.js based forum software built for the modern web
patching app setup to also create the client-side config automatically.
Julian Lam85b9879ab858
diff --git a/app.js b/app.jsindex 20776f3a07..fd783ac7c5 100644--- a/app.js+++ b/app.js@@ -1,13 +1,3 @@-// NodeFly-require('nodefly').profile(- '4b15d2184244dba6a0589932aa79ec50',- 'NodeBB',- {- blockThreshold: 10- }-);--// Read config.js to grab redis infovar fs = require('fs'),path = require('path'),@@ -127,6 +117,7 @@ fs.readFile(path.join(__dirname, 'config.json'), function(err, data) {}}+ // Server-side configfs.writeFile(path.join(__dirname, 'config.json'), JSON.stringify(config, null, 4), function(err) {if (err) throw err;else {@@ -137,6 +128,15 @@ fs.readFile(path.join(__dirname, 'config.json'), function(err, data) {process.exit();}});++ // Client-side config+ fs.writeFile(path.join(__dirname, 'public', 'config.json'), JSON.stringify({+ socket: {+ address: base_url,+ port: port+ },+ api_url: base_url + ':' + port + '/api/'+ }, null, 4))});});});diff --git a/package.json b/package.jsonindex 10420adcc8..6dd89d58ee 100644--- a/package.json+++ b/package.json@@ -29,8 +29,7 @@"node-gyp": "0.9.5","async": "0.2.8","node-imagemagick": "0.1.8",- "node-rss": "1.0.1",- "nodefly": "stable"+ "node-rss": "1.0.1"},"devDependencies": {},"optionalDependencies": {},