Added another plugin: roosterio docs

This commit is contained in:
Bram van der Veen 2015-08-16 18:08:52 +02:00
parent 091440cd2a
commit 6d241b07a9
3 changed files with 7 additions and 2 deletions

3
.gitmodules vendored
View file

@ -1,3 +1,6 @@
[submodule "plugins/hoewerkt"] [submodule "plugins/hoewerkt"]
path = plugins/hoewerkt path = plugins/hoewerkt
url = http://git.werkmanrooster.nl/werkmanrooster/hoewerkt.git url = http://git.werkmanrooster.nl/werkmanrooster/hoewerkt.git
[submodule "plugins/docs"]
path = plugins/docs
url = http://git.werkmanrooster.nl/werkmanrooster/docs.git

1
plugins/docs Submodule

@ -0,0 +1 @@
Subproject commit 12dd175878e2c52df376450a51dc01232abed30c

5
web.js
View file

@ -6,7 +6,6 @@
* @author Bram van der Veen <96aa48@gmail.com> * @author Bram van der Veen <96aa48@gmail.com>
*/ */
//Import first-party modules. //Import first-party modules.
var fs = require('fs'); var fs = require('fs');
@ -79,6 +78,8 @@ app.param('api', api);
//Initialize the server on configured web port. //Initialize the server on configured web port.
app.listen(config().webPort); app.listen(config().webPort);
console.log('Started rooster.io on port', config().webPort)
plugins();
/** /**
* Function for initialising all of the plugins in the plugins/ directory. * Function for initialising all of the plugins in the plugins/ directory.
@ -89,7 +90,7 @@ function plugins() {
for (plugin of pluginsDirectory) { for (plugin of pluginsDirectory) {
var app = __dirname + '/plugins/' + plugin + '/app.js'; var app = __dirname + '/plugins/' + plugin + '/app.js';
if (fs.existsSync(app)) { if (fs.existsSync(app)) {
var app = require(app)(config().webPort + (1 + plugin.indexOf(pluginsDirectory))); var app = require(app)(config().webPort + (1 + pluginsDirectory.indexOf(plugin)));
} }
} }
} }