I'll be using bash for running the commands as I'm on debian linux. If you're are on windows you can either use WSL or find the equivalent commands on your own and same for the mac os.
- Clone the repo
git clone https://github.com/bhishekprajapati/beat22- Install
node@20andpnpm@9. You can use node version manager. Run to verify the version.
node -v # 20.x.xpnpm -v # 9.x.x- Install docker on your machine. You can use docker install script click here.
Verify docker compose version by running this below command.
sudo docker compose version # Docker Compose version v2.38.1- Check example env file at
~/services/auth/.env.examplefrom the project root.
Then create a new .env file with these variables
# Go to your mongo atlas and grab the connection string
DATABASE_URL="<REPLACE-WITH-YOUR-MONGO-ATLAS-REPLICA-SET-URL>"
# To generate the key run this command
# openssl rand -hex 32
AUTH_JWT_PRIVATE_KEY="<REPLACE-WITH-YOUR-PRIVATE-KEY>"
# To generate the associated id run this command
# openssl rand -hex 16
AUTH_JWT_KEY_ID="<REPLACE-WITH-YOUR-KEY-ID>"
- Check example env file at
~/services/files/.env.examplefrom the project root.
Then create a new .env file with these variables
# Go to your mongo atlas and grab the connection string
DATABASE_URL="<REPLACE-WITH-YOUR-MONGO-ATLAS-REPLICA-SET-URL>"
Other environment variables are optional and provided by docker compose file and some default at server implementation level.
You can check ~/services/auth/srv/env.ts and ~/services/files/srv/env.ts files to see all the environment variables.
Now, We are ready to start our local infra setup. Run these below commands one by one.
# cd /into/project/root
sudo docker compose up -d
Wait until all the containers finshes building and running. Once that's done. the run this below command to follow logs of all the services.
sudo docker compose logs -fAfter finishing, tear down the local running infra
sudo docker compose down- You can test using ui running on
localhost:3000.
NOTE: While signing up for a new account, make sure to choose a password of min length 16 and max length of 20.
- Using postman
Clone the postman workspace from here
