UNPKG

proctokit

Version:

A server-side SDK for a secure online proctoring system, enabling real-time monitoring of exam sessions.

25 lines (23 loc) 955 B
/** * Configuration class for the ProctorSDK for Node.js. * It holds the server settings and the public download URLs for the client installers. */ class ProctorConfig { /** * @param {number} port The port for the WebSocket server to listen on. * @param {string} host The host to bind to (e.g., '0.0.0.0'). * @param {Object.<string, string>} installerUrls An object where the key is the OS ('windows', 'macos') and the value is the public download URL. */ constructor(port, host = '0.0.0.0', installerUrls) { if (!port) { throw new Error('Port is a required configuration property.'); } if (!installerUrls || Object.keys(installerUrls).length === 0) { throw new Error('Installer URLs must be provided.'); } this.port = port; this.host = host; this.installerUrls = installerUrls; } } module.exports = ProctorConfig;