18 lines
391 B
JavaScript
18 lines
391 B
JavaScript
// Configuration file for the server
|
|
|
|
conscrits = ["team00", "team01"];
|
|
vieux = ["npc0", "npc1"];
|
|
|
|
// return 0 for conscrit, 1 for vieux, 2 otherwise
|
|
function validator(id){
|
|
if(conscrits.includes(id)) return 0;
|
|
if(vieux.includes(id)) return 1;
|
|
return 2;
|
|
}
|
|
|
|
module.exports = {
|
|
"port": 9000,
|
|
"key": "certif/server.key",
|
|
"cert": "certif/server.crt",
|
|
"validator": validator
|
|
}
|