mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-09-11 17:16:40 +08:00
updated documentation and fixed bot bug
This commit is contained in:
parent
bb87a56d12
commit
7c6dc9405f
4 changed files with 7 additions and 12 deletions
|
@ -62,7 +62,7 @@ Git is optional but we _highly_ recommend you use it. Monkeytype uses the Git so
|
|||
|
||||
- In your Firebase console, go to Project Settings > Service Accounts
|
||||
- Click "Generate New Private Key"
|
||||
- Save as `serviceAccountKey.json` in the `functions/` directory
|
||||
- Save as `serviceAccountKey.json` inside the `backend/credentials/` directory. You will have to create the credentials folder.
|
||||
|
||||
1. Enable Firebase Authentication
|
||||
|
||||
|
@ -70,10 +70,12 @@ Git is optional but we _highly_ recommend you use it. Monkeytype uses the Git so
|
|||
- Click on `Email/Password`, enable it, and save
|
||||
- Click on `Google`, add a support email and save
|
||||
|
||||
## Prerequisite - Mongo Setup
|
||||
#### Mongo Setup
|
||||
|
||||
1. Install [Mongodb Community Edition](https://docs.mongodb.com/manual/administration/install-community/) and ensure that it is running
|
||||
|
||||
1. Inside the backend folder, copy `example.env` to `.env` in the same directory.
|
||||
|
||||
1. Optional - Install [Mongodb-compass](https://www.mongodb.com/try/download/compass?tck=docs_compass). This tool can be used to see and manipulate your data visually.
|
||||
1. To connect, type `mongodb://localhost:27017` in the connection string box and press connect. The monkeytype database will be created and shown` after the server is started.
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ app.get("/getBananas/:discordId", botAuth, (req, res) => {
|
|||
|
||||
app.get("/getUserDiscordData/:uid", botAuth, (req, res) => {
|
||||
//for announceDailyLbResult
|
||||
User.findOne({ uid: req.body.uid }, (err, user) => {
|
||||
User.findOne({ uid: req.params.uid }, (err, user) => {
|
||||
res.send({ name: user.name, discordId: user.discordId });
|
||||
});
|
||||
});
|
||||
|
|
2
backend/example.env
Normal file
2
backend/example.env
Normal file
|
@ -0,0 +1,2 @@
|
|||
DB_URI=mongodb://localhost:27017
|
||||
DB_NAME=monkeytype
|
|
@ -1,9 +0,0 @@
|
|||
# Secrets can be generated at https://www.grc.com/passwords.htm
|
||||
ACCESS_TOKEN_SECRET=6JlduNw96JONRtmg7Ru6tCW0UN42LQyzlHE0e03p2HO4m5Gm7PrYjRCinHCfeMM
|
||||
REFRESH_TOKEN_SECRET=bnTfeI0J84XucqTWkHRPBCrewoJGIQySdHnL2bDrZp212tDyMG0fs5nf9aUXT9N
|
||||
|
||||
#Gmail login for email verification
|
||||
#App password can be generated on account page under security, sigining in to Google
|
||||
#Must enable 2 step verification before generating app password
|
||||
MAIL_ADDRESS=youremail@gmail.com
|
||||
MAIL_PASSWORD=cqvpgasbggytzfjq
|
Loading…
Add table
Reference in a new issue