@@ -19,7 +19,7 @@ If you want to host on your local computer and review the source code, follow th
19
19
- [ Git] ( https://git-scm.com/ ) and [ Node.js] ( https://nodejs.org/ )
20
20
- [ Visual Studio] ( http://visualstudio.com )
21
21
22
- ### Steps
22
+ ### Steps to run
23
23
24
24
1 . [ Clone the repo] ( https://help.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository )
25
25
@@ -57,6 +57,82 @@ setx ALPACA_SECRET "YOUR ALPACA SECRET KEY"
57
57
setx AzureWebJobsStorage "UseDevelopmentStorage=true"
58
58
` ` `
59
59
60
+ ## Using the Dev Container
61
+
62
+ This repository includes a Dev Container configuration to provide a consistent development environment . The Dev Container includes the following tools and dependencies :
63
+
64
+ - .NET SDK 9
65
+ - Node LTS
66
+ - NPM latest
67
+ - GitHub CLI
68
+ - Angular CLI
69
+ - Azure Functions Core Tools
70
+ - PowerShell
71
+ - ESLint
72
+
73
+ ### Steps to use Dev Container
74
+
75
+ 1. Install [Visual Studio Code ](https :// code.visualstudio.com/) and the [Remote - Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers).
76
+
77
+ 2. Clone the repository and open it in Visual Studio Code .
78
+
79
+ 3. When prompted , reopen the repository in the Dev Container .
80
+
81
+ 4. The Dev Container will be built and started automatically . You can now use the integrated terminal and other tools within the Dev Container .
82
+
83
+ ### Environment Variables
84
+
85
+ The Dev Container includes the following environment variables :
86
+
87
+ - ` ALPACA_KEY `
88
+ - ` ALPACA_SECRET `
89
+ - ` AzureWebJobsStorage `
90
+
91
+ These environment variables are required for fetching quote data from the Alpaca API and for local development and debugging of Azure Functions .
92
+
93
+ ## Setting Up Azure Key Vault for Storing Secrets
94
+
95
+ To securely store and manage secrets such as ` ALPACA_KEY ` and ` ALPACA_SECRET ` , you can use Azure Key Vault . Follow the steps below to set up and use Azure Key Vault for storing secrets .
96
+
97
+ ### Steps to use Azure Secrets
98
+
99
+ 1. Create an Azure Key Vault in your Azure subscription .
100
+
101
+ 2. Add the ` ALPACA_KEY ` and ` ALPACA_SECRET ` secrets to the Key Vault .
102
+
103
+ 3. Update the application code to retrieve these secrets from Azure Key Vault during runtime .
104
+
105
+ 4. Ensure that the necessary permissions are granted to the application to access the Key Vault .
106
+
107
+ 5. Update the ` local.settings.json ` file in the ` server/Functions ` directory to include the ` ALPACA_KEY ` and ` ALPACA_SECRET ` environment variables .
108
+
109
+ 6. Update the ` README.md ` to include instructions for setting up and using Azure Key Vault for storing secrets .
110
+
111
+ ## Using User Secrets for Local Development
112
+
113
+ For local development , you can use User Secrets to store sensitive information such as ` ALPACA_KEY ` and ` ALPACA_SECRET ` . Follow the steps below to set up and use User Secrets for local development .
114
+
115
+ ### Steps
116
+
117
+ 1. In the ` server/Functions ` directory , run the following command to initialize User Secrets :
118
+
119
+ ` ` ` bash
120
+ dotnet user-secrets init
121
+ ` ` `
122
+
123
+ 2. Add the ` ALPACA_KEY ` and ` ALPACA_SECRET ` secrets to User Secrets :
124
+
125
+ ` ` ` bash
126
+ dotnet user-secrets set "ALPACA_KEY" "YOUR_ALPACA_API_KEY"
127
+ dotnet user-secrets set "ALPACA_SECRET" "YOUR_ALPACA_SECRET_KEY"
128
+ ` ` `
129
+
130
+ 3. Update the application code to retrieve these secrets from User Secrets during runtime .
131
+
132
+ 4. Ensure that the necessary permissions are granted to the application to access the User Secrets .
133
+
134
+ 5. Update the ` README.md ` to include instructions for setting up and using User Secrets for local development .
135
+
60
136
## Contributing
61
137
62
138
This is an open - source project . If you want to report bugs , contribute fixes , or add new indicators , please review our [contributing guidelines ](docs / CONTRIBUTING .md ).
0 commit comments