This repository has been archived on 2022-05-17. You can view files and clone it, but cannot push or open issues or pull requests.
brainlet/config.js

52 lines
1.8 KiB
JavaScript
Executable file

module.exports = {
mongoUrl: "mongodb://127.0.0.1:27017/app",
ports: {mainServerPort: 3005},
corsAllowList: [
// This is the development corsAllowList. Modify it according to your setup and domains.
// Please note that the protocol (http://, https://) matters here. If you use https, make sure to add it as such.
// Ports also matter. (and obviously the domain matters too)
// EXAMPLE: If my domain is example.com and I'm hosting brainlet (and brainlet-react's static files in the app folder) with HTTPS:
// "https://example.com"
"http://localhost:3005", // Allow the server itself (provided it's listening on 3005)
],
policies: {
// Currently, policies apply to all users - no matter the role.
allowChannelCreation: true,
allowPostCreation: false,
allowAccountCreation: true,
allowLogin: true,
allowGatewayConnection: true,
// The policy below will make all messages sent over the gateway to be in plain text saved to the database.
// This is experimental and dangerous, and, as such, should generally not be used.
allowSavingMessages: false,
perUserMaxGatewayConnections: 4
},
/*
--- Adding a special code requirement for account creation
- uncomment the code below and fill in the specialCode string with *A 12 CHARACTER* string
restrictions: {
signup: {
specialCode: ""
}
},
*/
address: "localhost",
tokenExpiresIn: "8h",
gatewayPingInterval: 15000,
gatewayPingCheckInterval: 4500,
clientFacingPingInterval: 14750,
bcryptRounds: 10,
experiments: {
voiceSFUTesting: false
},
roleMap: {
"BANNED": 0,
"RESTRICTED": 1,
"USER": 2,
"BOT": 3,
"ADMIN": 4
},
};