Added another plugin: roosterio docs
This commit is contained in:
parent
091440cd2a
commit
6d241b07a9
3 changed files with 7 additions and 2 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
|
@ -1,3 +1,6 @@
|
|||
[submodule "plugins/hoewerkt"]
|
||||
path = plugins/hoewerkt
|
||||
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
1
plugins/docs
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 12dd175878e2c52df376450a51dc01232abed30c
|
||||
5
web.js
5
web.js
|
|
@ -6,7 +6,6 @@
|
|||
* @author Bram van der Veen <96aa48@gmail.com>
|
||||
*/
|
||||
|
||||
|
||||
//Import first-party modules.
|
||||
var fs = require('fs');
|
||||
|
||||
|
|
@ -79,6 +78,8 @@ app.param('api', api);
|
|||
|
||||
//Initialize the server on configured web port.
|
||||
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.
|
||||
|
|
@ -89,7 +90,7 @@ function plugins() {
|
|||
for (plugin of pluginsDirectory) {
|
||||
var app = __dirname + '/plugins/' + plugin + '/app.js';
|
||||
if (fs.existsSync(app)) {
|
||||
var app = require(app)(config().webPort + (1 + plugin.indexOf(pluginsDirectory)));
|
||||
var app = require(app)(config().webPort + (1 + pluginsDirectory.indexOf(plugin)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue