Skip to content

Commit 2e33ff3

Browse files
clean up comments in server.js
1 parent 39949dc commit 2e33ff3

File tree

1 file changed

+8
-12
lines changed
  • web-integrations/prebid-integrations/client-server

1 file changed

+8
-12
lines changed

web-integrations/prebid-integrations/client-server/server.js

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// 4. Return the token to the front-end for use with Prebid.js
1212
// ============================================================================
1313

14-
// Load environment variables from .env file (for local development)
14+
1515
require('dotenv').config({path: '../../../.env'});
1616

1717
const axios = require('axios');
@@ -28,15 +28,15 @@ const uid2ApiKey = process.env.UID2_API_KEY; // Your API Key from UID2
2828
const uid2ClientSecret = process.env.UID2_CLIENT_SECRET; // Your Client Secret from UID2 Portal
2929

3030
// Encryption constants required by UID2 API
31-
const ivLength = 12; // Initialization vector length
32-
const nonceLength = 8; // Nonce (random number) length
33-
const timestampLength = 8; // Timestamp length
34-
const encryptionAlgo = 'aes-256-gcm'; // AES-256-GCM encryption algorithm
31+
const ivLength = 12;
32+
const nonceLength = 8;
33+
const timestampLength = 8;
34+
const encryptionAlgo = 'aes-256-gcm';
3535

3636
// Middleware setup
37-
app.use(express.static('public')); // Serve static files (HTML, CSS, JS) from 'public' folder
38-
app.use(express.json()); // Parse JSON request bodies
39-
app.use(express.urlencoded({ extended: true })); // Parse URL-encoded form data
37+
app.use(express.static('public'));
38+
app.use(express.json());
39+
app.use(express.urlencoded({ extended: true }));
4040

4141
// ============================================================================
4242
// HELPER FUNCTIONS FOR ENCRYPTION/DECRYPTION
@@ -200,9 +200,5 @@ app.post('/login', async (req, res) => {
200200
// ============================================================================
201201
app.listen(port, () => {
202202
console.log(`UID2 Prebid Client-Server example listening at http://localhost:${port}`);
203-
console.log(`Make sure you have set the following environment variables:`);
204-
console.log(` - UID2_API_KEY`);
205-
console.log(` - UID2_CLIENT_SECRET`);
206-
console.log(` - UID2_BASE_URL (optional, defaults to integration environment)`);
207203
});
208204

0 commit comments

Comments
 (0)