Skip to content

Commit 9302373

Browse files
committed
added script to create env.js for the petclininc micro services workshop
1 parent f90e3e3 commit 9302373

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
# Define the path to the JavaScript file
4+
JS_FILE="/home/splunk/spring-petclinic-microservices/spring-petclinic-api-gateway/src/main/resources/static/scripts/env.js"
5+
6+
# Create the directory if it doesn't exist
7+
mkdir -p "$(dirname "$JS_FILE")"
8+
9+
# Write the content to the JavaScript file
10+
cat <<EOF > "$JS_FILE"
11+
env = {
12+
RUM_REALM: '$RUM_REALM',
13+
RUM_AUTH: '$RUM_AUTH',
14+
RUM_APP_NAME: '$RUM_APP_NAME',
15+
RUM_ENVIRONMENT: '$RUM_ENVIRONMENT'
16+
}
17+
EOF
18+
19+
echo "JavaScript file generated at: $JS_FILE"

0 commit comments

Comments
 (0)