diff --git a/.gitmodules b/.gitmodules index 9f3d72d..9f10e84 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/plugins/docs b/plugins/docs new file mode 160000 index 0000000..12dd175 --- /dev/null +++ b/plugins/docs @@ -0,0 +1 @@ +Subproject commit 12dd175878e2c52df376450a51dc01232abed30c diff --git a/web.js b/web.js index 521aa39..e3e5d7c 100644 --- a/web.js +++ b/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))); } } }