RMQ_URL=<amqp://<username>:<password>@<hostname>:5672/v_host>
MAIL_USERNAME=<email_username>
MAIL_PASSWORD=<email_password>
TRANSACTION_QUEUE=<queue_name>
ADMIN_QUEUE=<queue_name>
-
Open the project in Visual Studio
-
Right click on the project and select
Manage User Secrets -
Add the following secrets to the
secrets.jsonfile:{ "MailTrap": { "USERNAME": "<username>", "PASSWORD": "<password>" }, "RabbitMQ": { "RMQ_URL": "amqp://<username>:<password>@<hostname>:5672/" } }
-
Open a terminal in the project directory
-
Run the following commands:
dotnet user-secrets init dotnet user-secrets set "RabbitMQ:RMQ_URL" "amqp://<username>:<password>@<hostname>:5672/" dotnet user-secrets set "MailTrap:USERNAME" "<username>" dotnet user-secrets set "MailTrap:PASSWORD" "<password>"
-
Verify that the secret was added by running:
dotnet user-secrets list
-
The output should be similar to:
RabbitMQ:RMQ_URL = amqp://<username>:<password>@<hostname>:5672/ MailTrap:USERNAME = <username> MailTrap:PASSWORD = <password>