All Anolet services use Doppler to manage environment variables. To get access to Anolet's Doppler workplace, sign up to Doppler with your @anolet.com email. You will be prompted to create your own Doppler workplace. Click "Skip" located in the top right. Then, ask Rus to grant you permissions. You will be added as a collaborator and will be able to view secrets for dev.
Install Scoop (if you don't already have it) Run the following commands in PowerShell:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
irm get.scoop.sh | iexInstall Doppler with Scoop Run the following commands:
scoop bucket add doppler https://github.com/DopplerHQ/scoop-doppler.git
scoop install dopplerNow, verify the Doppler CLI was installed by checking its version:
doppler -vNow, you will have to authenticate Doppler CLI with your Doppler account by running:
doppler loginYou will only have to do this part once for all of Anolet, so you will not need to reinstall Doppler CLI or relogin if you are working on the API.
Now, you'll need to configure this folder to use the Doppler configuration for the dev@client project:
doppler setupYou'll see a message that says "Use default settings from repo config file (...)?". Answer yes. You have now configured Doppler.
We have provided an MQTT server for use in dev environments. Doppler is preconfigured with the related environment variables for this MQTT server.
We will provide instructions on how to do this later. The global dev MQTT server is more than sufficient for right now, but if you insist, you can find documentation online on how to create your own MQTT server.
You'll need to install Ubuntu to run Redis. Download Ubuntu for Windows
Install Redis by running the following commands in Ubuntu for Windows:
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
sudo apt-get update
sudo apt-get install redisDoppler is already configured to use the default credentials and default URL for a local redis instance, redis://localhost:6379.
Doppler is configured to use the staging API for dev, so you do not need to worry about creating a local API instance. However, do not mess around with visit counts or current player counts. The code by default will not modify these counts as long as the ENVIRONMENT environment secret is set to dev (which it is).
If you want to test the client with a local API, or otherwise change any environment variables regardless, create a branched config.
Install all the NPM packages by running the following command:
npm iTo start redis-server, all you need to do is run the following command in Ubuntu for Windows:
redis-serverStart the node server & webpack with the following command:
npm run devThis will automatically restart the server when server changes are made and automatically rebuild with webpack when client changes are made.
