Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added .npmignore to deploy on nodejitso. added candy.connect args to …

…config
  • Loading branch information...
commit 87a673f8cd8c4f4de1ad288ea1ac07e2e69dcd9c 1 parent ab7e31b
@pstadler authored
View
4 .gitignore
@@ -1,2 +1,4 @@
-.nodester.appconfig
+.DS_Store
config.js
+package.json
+.nodester.appconfig
View
3  .npmignore
@@ -0,0 +1,3 @@
+.DS_Store
+.nodester.appconfig
+node_modules
View
4 config.js.sample
@@ -3,7 +3,9 @@ var config = {
// See http://amiadogroup.github.com/candy/#configuration
candy: {
core: { debug: false, autojoin: ['test@conference.localhost.local'] },
- view: { resources: 'candy/res/' }
+ view: { resources: 'candy/res/' },
+ // Args passed to Candy.Core.connect();
+ connect: []
},
// HTTP-Bind settings
http_bind: {
View
2  public/index.html
@@ -13,7 +13,7 @@
$(document).ready(function() {
Candy.init('http-bind/', OPTIONS);
- Candy.Core.connect();
+ Candy.Core.connect(CONNECT);
});
</script>
</head>
View
5 server.js
@@ -7,6 +7,11 @@ var config = require(__dirname + '/config'),
// parse index file only once
fs.readFile(__dirname + '/public/index.html', 'ascii', function(err, data) {
indexFile = data.replace('OPTIONS', JSON.stringify(config.candy));
+ var connect = '';
+ if(Array.isArray(config.candy.connect) && config.candy.connect.length > 0) {
+ var connect = "'" + config.candy.connect.join("', '") + "'";
+ }
+ indexFile = indexFile.replace('CONNECT', connect);
});
http.createServer(function (request, response) {
Please sign in to comment.
Something went wrong with that request. Please try again.