From 8f87546aeb5c14539601ab25c0e07630a5e5043a Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Mon, 24 May 2021 20:47:06 +0200 Subject: [PATCH] :sparkles: use new config --- .env.example | 4 ++ client_test/index.html | 5 +- package-lock.json | 25 ++------- src/Server.ts | 18 ++++--- src/middlewares/Authentication.ts | 9 ++-- src/middlewares/CORS.ts | 2 +- src/middlewares/GlobalRateLimit.ts | 5 +- src/routes/auth/login.ts | 17 +++---- src/routes/auth/register.ts | 51 ++++++++++--------- .../#channel_id/messages/bulk-delete.ts | 5 +- src/routes/channels/#channel_id/pins.ts | 13 +++-- src/routes/gateway.ts | 6 +-- src/routes/guilds/index.ts | 5 +- src/routes/guilds/templates/index.ts | 11 ++-- src/start.ts | 5 +- src/util/Config.ts | 37 ++++++++------ src/util/Member.ts | 6 +-- src/util/passwordStrength.ts | 15 +----- 18 files changed, 110 insertions(+), 129 deletions(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 00000000..0573c605 --- /dev/null +++ b/.env.example @@ -0,0 +1,4 @@ +MONGO_URL=mongodb://localhost/fosscord +PORT=3001 +PRODUCTION=TRUE +THREADS=# automatically use all available cores, only available if production = true \ No newline at end of file diff --git a/client_test/index.html b/client_test/index.html index 915a3378..328b137b 100644 --- a/client_test/index.html +++ b/client_test/index.html @@ -18,6 +18,7 @@ MEDIA_PROXY_ENDPOINT: "https://media.discordapp.net", WIDGET_ENDPOINT: "//discord.com/widget", INVITE_HOST: "discord.gg", + GUILD_TEMPLATE_HOST: "discord.new", GIFT_CODE_HOST: "discord.gift", RELEASE_CHANNEL: "stable", @@ -32,10 +33,8 @@ MIGRATION_SOURCE_ORIGIN: "https://discordapp.com", MIGRATION_DESTINATION_ORIGIN: "https://discord.com", HTML_TIMESTAMP: Date.now(), - ALGOLIA_KEY: "aca0d7082e4e63af5ba5917d5e96bed0", + ALGOLIA_KEY: "aca0d7082e4e63af5ba5917d5e96bed0" }; - -