- Introduced a new workspace for FaceAI in package.json. - Implemented FaceAI handoff logic in faceai_handoff.php, including identity verification and token signing. - Created faceai_return.php to handle return requests from FaceAI, validating tokens and forwarding results. - Developed faceai_simulator.php and faceai_simulator_view.php for simulating the FaceAI interface with demo photos. - Enhanced rus-ecom-240621.js to support new FaceAI features, including dynamic URL building and button integration. - Added faceai_config.php for configuration management, including environment variable handling and utility functions. - Updated HTML structure and styles in simulator view for better user experience.
18 lines
957 B
JavaScript
18 lines
957 B
JavaScript
import path from 'node:path';
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
const defaultLocalLegacyRoot = path.resolve(__dirname, '../../../../www');
|
|
|
|
export const config = {
|
|
port: Number(process.env.PORT || 3001),
|
|
frontendUrl: process.env.FACEAI_FRONTEND_URL || 'http://localhost:5173',
|
|
publicBaseUrl: process.env.FACEAI_PUBLIC_BASE_URL || 'http://localhost:3001',
|
|
legacyReturnUrl: process.env.FACEAI_LEGACY_RETURN_URL || 'http://localhost:3001/dev/legacy/return',
|
|
enableLocalLegacyStatic: process.env.FACEAI_ENABLE_LOCAL_LEGACY_STATIC
|
|
? process.env.FACEAI_ENABLE_LOCAL_LEGACY_STATIC === '1'
|
|
: process.env.NODE_ENV !== 'production',
|
|
localLegacyStaticRoot: process.env.FACEAI_LOCAL_LEGACY_STATIC_ROOT || defaultLocalLegacyRoot,
|
|
sharedSecret: process.env.FACEAI_SHARED_SECRET || 'change-me',
|
|
sessionCookieName: process.env.FACEAI_SESSION_COOKIE || 'rus_faceai_session'
|
|
};
|