// To know in which environment the code run
env: process.env.NODE_ENV || 'development',
-
+
// CORS: cross-origin resource sharing options
cors: {
enable: true,
expire: 30*60*1000, //30 minutes in milliseconds
},
+ // Path to tournament repository (to synchronize DBs)
+ tourneyPath: "/path/to/folder",
+
// Email settings
mail: {
host: "mail_host_address",
const access = require("../utils/access");
const params = require("../config/parameters");
const sanitizeHtml_pkg = require('sanitize-html');
+const { exec } = require("child_process");
const allowedTags = [
'h3', 'h4', 'h5', 'h6', 'blockquote', 'p', 'a', 'ul', 'ol', 'li', 'b',
email: email
};
setAndSendLoginToken("Welcome to " + params.siteURL, user);
+ // Update tournament DB (TODO: if error, log it)
+ exec(params.tourneyPath + "/sync_users.py");
res.json({});
}
});