Improve security and deployment flexibility for external access
Update README and application configurations to support reverse proxy setups, including TLS termination and proper cookie handling, and add an option to seed demo meetings. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: c15da2be-cee7-4cbb-8d58-f9fcc3c38ed7 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/FvHcc7z Replit-Helium-Checkpoint-Created: true
This commit is contained in:
+19
-6
@@ -646,13 +646,26 @@ async function main() {
|
||||
}
|
||||
}
|
||||
|
||||
// Executive meetings: sample data for today (idempotent per-date)
|
||||
// Executive meetings: sample data for today (idempotent per-date).
|
||||
//
|
||||
// Opt-in only — a vanilla self-hosted install should start with an
|
||||
// empty Executive Meetings module. Set `SEED_DEMO_MEETINGS=true` in
|
||||
// your environment when bootstrapping a demo / staging deploy that
|
||||
// benefits from realistic-looking sample data.
|
||||
const seedDemoMeetings =
|
||||
(process.env.SEED_DEMO_MEETINGS ?? "").toLowerCase() === "true";
|
||||
const today = new Date().toISOString().slice(0, 10);
|
||||
const existingForToday = await db
|
||||
.select({ id: executiveMeetingsTable.id })
|
||||
.from(executiveMeetingsTable)
|
||||
.where(eq(executiveMeetingsTable.meetingDate, today));
|
||||
if (existingForToday.length === 0) {
|
||||
const existingForToday = seedDemoMeetings
|
||||
? await db
|
||||
.select({ id: executiveMeetingsTable.id })
|
||||
.from(executiveMeetingsTable)
|
||||
.where(eq(executiveMeetingsTable.meetingDate, today))
|
||||
: [];
|
||||
if (!seedDemoMeetings) {
|
||||
console.log(
|
||||
"Executive Meetings demo data skipped (set SEED_DEMO_MEETINGS=true to enable)",
|
||||
);
|
||||
} else if (existingForToday.length === 0) {
|
||||
{
|
||||
const sampleMeetings: Array<{
|
||||
meeting: {
|
||||
|
||||
Reference in New Issue
Block a user