Closed blockarchitech closed 1 year ago
FYI, this is the new .env:
# znciweb secrets
SESSION_SECRET=b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAlwAAAAdzc2gtcn
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa # yes, this is an ssh key. don't judge me.
# discord secrets
CLIENT_SECRET=abc
CLIENT_ID=abc
REDIRECT_URI=http://localhost:3000/oauth/callback
A firebase service account named serviceAccountKey.json
is also required now
Only places I'm using var is in bin/www
as those might be mutated at runtime, and routes/oauth
which generally is good practice.
See the new fix, however.
As for whitespace, this was formatted using Prettier before PR.
Also, could you elaborate on Firestore queries? This is the way I've always known to use.
Prettier doesn't automatically add whitespace, for example, after variable definitions and before for/if statements. How is using var
anywhere a good practice? I believe I saw it in the routes as well. Relating to the queries, async/await should probably be the way to go for a better DX (no .then
chains).
If I recall correctly, express can handle async functions correctly but I don't know if that is good practice or breaks anything else. Reviewing new changes now.
You cannot mutate a constant.
Wdym?
let a = "b";
var b = "a";
a = "a" // error
b = "b" // good
See Discord.