- Create a MongoDB account.
- Create a new cluster.
- Click Connect.
- Create a database user and copy the password into a note temporarily.
- Click Choose a connection method.
- Click Drivers.
- Select Node.js for the Driver.
- Copy the URL given in step/part 3.
- Paste the copied URL into the MONGO_URI variable.
- Copy and paste the password you saved earlier into the URL as directed in step/part 3.
- Output of running
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
- Output of running
node -e "console.log(require('crypto').randomUUID())"
- From the root of the project, run each of the following (WSL/Linux/macOS, not Windows):
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:4096 -out temp/server_private.pemopenssl rsa -pubout -in temp/server_private.pem -out temp/server_public.pemnode -e "const fs=require('fs');const s=fs.readFileSync('temp/server_private.pem','utf8');const b=Buffer.from(s,'utf8').toString('base64').replace(/\+/g,'-').replace(/\//g,'_').replace(/=+$/,'');fs.writeFileSync('temp/SERVER_PRIVATE_KEY_B64URL.txt',b)"node -e "const fs=require('fs');const s=fs.readFileSync('temp/server_public.pem','utf8');const b=Buffer.from(s,'utf8').toString('base64').replace(/\+/g,'-').replace(/\//g,'_').replace(/=+$/,'');fs.writeFileSync('temp/SERVER_PUBLIC_KEY_B64URL.txt',b)"
- Paste the contents of SERVER_PRIVATE_KEY_B64URL.txt and SERVER_PUBLIC_KEY_B64URL.txt in the temp folder into their respective fields in the .env file.
- From /ChatGeek (not in /backend), run
./backend/scripts/slc-certs/generate.sh
- Run
cd backend - Run
npm start- May need to install npm if not done so already.
- May need to run
sudo npm install -g nodemonif you receive the error: "nodemon: Permission denied".