mirror of
https://github.com/olehomelchenko/minivlat-local-ua.git
synced 2025-12-21 21:22:24 +00:00
Refactor webhook URL configuration to use environment variable
- Updated questionnaire.js to use a local API endpoint as a fallback for the webhook URL. - Modified server.js to retrieve the webhook URL from an environment variable. - Added .env.example file to provide a template for environment configuration, including the optional webhook URL. - Added an empty responses.json for local storage
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
// This file handles the logic for the questionnaire, including collecting additional participant information after the quiz.
|
||||
|
||||
const WEBHOOK_URL = "https://n8n.olehomelchenko.com/webhook/kse-research";
|
||||
// Configure webhook URL via environment variable on server side
|
||||
// Fallback to local API endpoint if no external webhook configured
|
||||
const WEBHOOK_URL = '/api/responses';
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const questionnaireForm = document.getElementById('questionnaire-form');
|
||||
|
||||
Reference in New Issue
Block a user