Skip to content

Commit 4920ee3

Browse files
committed
feat: show service URLs after deployment
1 parent e273dad commit 4920ee3

File tree

4 files changed

+33
-8
lines changed

4 files changed

+33
-8
lines changed

azure.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,10 @@ hooks:
4949
posix:
5050
shell: sh
5151
run: azd env get-values > .env
52+
postup:
53+
windows:
54+
shell: pwsh
55+
run: npm run -s env
56+
posix:
57+
shell: sh
58+
run: npm run -s env

env.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import 'dotenv/config';
2+
3+
function cyan(text) {
4+
return `\x1b[36m${text}\x1b[0m`;
5+
}
6+
7+
const deployedEnvironment = `
8+
\x1b[1mDeployed services URLs:\x1b[0m
9+
10+
- Burger API : ${cyan(process.env.BURGER_API_URL || 'Not found')}
11+
- Burger MCP : ${cyan(process.env.BURGER_MCP_URL ? process.env.BURGER_MCP_URL : 'Not found')}
12+
- Burger orders : ${cyan(process.env.BURGER_WEBAPP_URL || 'Not found')}
13+
- Agent webapp : ${cyan(process.env.AGENT_WEBAPP_URL || 'Not found')}
14+
`;
15+
16+
console.log(deployedEnvironment);

package-lock.json

Lines changed: 8 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"private": true,
66
"type": "module",
77
"scripts": {
8-
"start": "run-on-output -n 'ready' -p 'burger.*lock,agent.*lock' concurrently \"npm:start:*\" --kill-others",
8+
"start": "run-on-output -n 'ready' -p 'burger.*lock lease,agent.*lock lease' concurrently \"npm:start:*\" --kill-others",
99
"start:burger": "npm run start --workspace=burger-webapp",
1010
"start:mcp": "npm run start --workspace=burger-mcp --",
1111
"start:agent": "npm run start --workspace=agent-webapp",
@@ -44,6 +44,7 @@
4444
],
4545
"devDependencies": {
4646
"concurrently": "^9",
47+
"dotenv": "^17.2.2",
4748
"prettier": "^3",
4849
"rimraf": "^6",
4950
"run-on-output": "^1.0.1",

0 commit comments

Comments
 (0)