Skip to content

Commit 0d6d666

Browse files
committed
added more sample pages
1 parent 3489d3c commit 0d6d666

File tree

22 files changed

+4688
-27
lines changed

22 files changed

+4688
-27
lines changed

.env.sample

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
UID2_CSTG_BASE_URL="https://operator-integ.uidapi.com"
22
UID2_CSTG_SERVER_PUBLIC_KEY="UID2-X-I-MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEo+jcPlk8GWn3iG0R5Il2cbFQI9hR3TvHxaBUKHl5Vh+ugr+9uLMiXihka8To07ETFGghEifY96Hrpe5RnYko7Q=="
3-
UID2_CSTG_SUBSCRIPTION_ID="DMr7uHxqLU"
3+
UID2_CSTG_SUBSCRIPTION_ID="DMr7uHxqLU"
4+
5+
UID2_API_KEY="your-api-key"
6+
UID2_CLIENT_SECRET="your-client-secret"

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
.idea/
22
.DS_Store
3-
.env
3+
.env
4+
5+
# Node.js
6+
node_modules/
7+
**/node_modules/

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,20 @@ docker-compose up -d --build prebid-client
7272
### Available Services
7373

7474
- **`prebid-client`** - Prebid.js client-side integration (Port: 3031)
75+
- **`javascript-sdk-client`** - JavaScript SDK client-server integration (Port: 3051)
7576
- *More services will be added as they are containerized*
7677

7778
### Environment Configuration
7879

7980
Edit the `.env` file in the base directory to configure your UID2 settings:
8081
```
82+
# UID2 Configuration for all services
8183
UID2_BASE_URL="http://localhost:8080"
8284
SERVER_PUBLIC_KEY="your-public-key"
8385
SUBSCRIPTION_ID="your-subscription-id"
86+
87+
# Additional variables for client-server example
88+
UID2_API_KEY="your-api-key"
89+
UID2_CLIENT_SECRET="your-client-secret"
8490
```
8591

docker-compose.yml

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: '3.8'
2-
31
services:
42
prebid-client:
53
build:
@@ -8,20 +6,34 @@ services:
86
ports:
97
- "3031:3031"
108
container_name: prebid-client-side
9+
env_file:
10+
- .env
1111

1212
# Add more services here as needed
13+
javascript-sdk-client-side:
14+
build:
15+
context: .
16+
dockerfile: web-integrations/javascript-sdk/client-side/Dockerfile
17+
ports:
18+
- "3032:3032"
19+
container_name: javascript-sdk-client-side
20+
env_file:
21+
- .env
22+
1323
# google-secure-signals-client:
1424
# build:
1525
# context: .
1626
# dockerfile: web-integrations/google-secure-signals/client-side/Dockerfile
1727
# ports:
18-
# - "3032:3032"
28+
# - "3033:3033"
1929
# container_name: google-secure-signals-client
2030

21-
# javascript-sdk-client:
22-
# build:
23-
# context: .
24-
# dockerfile: web-integrations/javascript-sdk/client-side/Dockerfile
25-
# ports:
26-
# - "3033:3033"
27-
# container_name: javascript-sdk-client
31+
javascript-sdk-client:
32+
build:
33+
context: .
34+
dockerfile: web-integrations/javascript-sdk/client-server/Dockerfile
35+
ports:
36+
- "3051:3051"
37+
container_name: javascript-sdk-client-server
38+
env_file:
39+
- .env

web-integrations/javascript-sdk/client-server/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

web-integrations/javascript-sdk/client-server/.gitkeep

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
FROM node:20.11.0-alpine3.18
22

3+
# Copy entrypoint script
4+
COPY web-integrations/javascript-sdk/client-server/entrypoint.sh /entrypoint.sh
5+
RUN chmod +x /entrypoint.sh
6+
37
WORKDIR /usr/src/app
48

5-
COPY . .
9+
# Copy package files first for better caching
10+
COPY web-integrations/javascript-sdk/client-server/package*.json ./
611
RUN npm install
712

8-
EXPOSE 3000
9-
CMD [ "npm", "start" ]
13+
# Copy application files
14+
COPY web-integrations/javascript-sdk/client-server/server.js ./
15+
COPY web-integrations/javascript-sdk/client-server/public ./public/
16+
COPY web-integrations/javascript-sdk/client-server/views ./views/
17+
18+
EXPOSE 3051
19+
ENTRYPOINT ["/entrypoint.sh"]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
3+
# Start the Node.js application
4+
exec npm start

0 commit comments

Comments
 (0)