-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
14113d4
commit 8e5a9ad
Showing
7 changed files
with
99 additions
and
19 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
samples/react-azure-openai-api-stream/.devcontainer/devcontainer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// For more information on how to run this SPFx project in a VS Code Remote Container, please visit https://aka.ms/spfx-devcontainer | ||
{ | ||
"name": "SPFx 1.18.2", | ||
"image": "docker.io/m365pnp/spfx:1.18.2", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"editorconfig.editorconfig", | ||
"dbaeumer.vscode-eslint" | ||
] | ||
} | ||
}, | ||
"forwardPorts": [ | ||
4321, | ||
35729, | ||
5432 | ||
], | ||
"portsAttributes": { | ||
"4321": { | ||
"protocol": "https", | ||
"label": "Manifest", | ||
"onAutoForward": "silent", | ||
"requireLocalPort": true | ||
}, | ||
"5432": { | ||
"protocol": "https", | ||
"label": "Workbench", | ||
"onAutoForward": "silent" | ||
}, | ||
"35729": { | ||
"protocol": "https", | ||
"label": "LiveReload", | ||
"onAutoForward": "silent", | ||
"requireLocalPort": true | ||
} | ||
}, | ||
"postCreateCommand": "bash .devcontainer/spfx-startup.sh", | ||
"remoteUser": "node" | ||
} |
33 changes: 33 additions & 0 deletions
33
samples/react-azure-openai-api-stream/.devcontainer/spfx-startup.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
echo | ||
echo -e "\e[1;94mInstalling Node dependencies\e[0m" | ||
npm install | ||
|
||
## commands to create dev certificate and copy it to the root folder of the project | ||
echo | ||
echo -e "\e[1;94mGenerating dev certificate\e[0m" | ||
gulp trust-dev-cert | ||
|
||
# Convert the generated PEM certificate to a CER certificate | ||
openssl x509 -inform PEM -in ~/.rushstack/rushstack-serve.pem -outform DER -out ./spfx-dev-cert.cer | ||
|
||
# Copy the PEM ecrtificate for non-Windows hosts | ||
cp ~/.rushstack/rushstack-serve.pem ./spfx-dev-cert.pem | ||
|
||
## add *.cer to .gitignore to prevent certificates from being saved in repo | ||
if ! grep -Fxq '*.cer' ./.gitignore | ||
then | ||
echo "# .CER Certificates" >> .gitignore | ||
echo "*.cer" >> .gitignore | ||
fi | ||
|
||
## add *.pem to .gitignore to prevent certificates from being saved in repo | ||
if ! grep -Fxq '*.pem' ./.gitignore | ||
then | ||
echo "# .PEM Certificates" >> .gitignore | ||
echo "*.pem" >> .gitignore | ||
fi | ||
|
||
echo | ||
echo -e "\e[1;92mReady!\e[0m" | ||
|
||
echo -e "\n\e[1;94m**********\nOptional: if you plan on using gulp serve, don't forget to add the container certificate to your local machine. Please visit https://aka.ms/spfx-devcontainer for more information\n**********" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v16.18.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters