Update example config & surroundings

pull/16/head
ClaraCrazy 2024-10-03 02:14:47 +02:00
parent 71fd513bc0
commit 72ea96dc71
No known key found for this signature in database
GPG Key ID: EBBC896ACB497011
3 changed files with 30 additions and 19 deletions

View File

@ -11,9 +11,13 @@
"DOMAINS": {
"description": "Email domains"
},
"DELETE_MAILS_OLDER_THAN_DAYS": {
"description": "How many days to to wait before deleting messages",
"value": 2
"EMAIL_PURGE_TIME": {
"description": "Config for when to purge the emails",
"value": {
"time": 48,
"unit": "hours",
"convert": true
}
},
"IMAP_USER": {
"description": "Username to login to the imap server"
@ -47,6 +51,13 @@
"HTTP_BRANDING": {
"description": "The branding of the site",
"value": ["48hr.email", "Crazyco", "https://crazyco.xyz"]
},
"HTTP_EXAMPLES": {
"description": "Examples of the domains",
"value": {
"email": "example@48hr.email",
"ids": [1, 2, 3]
}
}
}
}

View File

@ -1,27 +1,27 @@
const config = {
email: {
domains: process.env.EMAIL_DOMAINS,
purgeTime: process.env.PURGE_TIME || {
time: 48,
domains: process.env.EMAIL_DOMAINS, // List object of domains
purgeTime: process.env.EMAIL_PURGE_TIME || {
time: 48, // Time value to purge
unit: 'hours', // minutes, hours, days
convert: true, // Convert to highest sensible unit
}
},
imap: {
user: process.env.IMAP_USER,
password: process.env.IMAP_PASSWORD,
host: process.env.IMAP_SERVER,
port: process.env.IMAP_PORT || 993,
tls: process.env.IMAP_TLS || true,
authTimeout: process.env.IMAP_AUTHTIMEOUT || 3000,
refreshIntervalSeconds: process.env.IMAP_REFRESH_INTERVAL_SECONDS || 60
user: process.env.IMAP_USER, // imap user
password: process.env.IMAP_PASSWORD, // imap password
host: process.env.IMAP_SERVER, // imap server
port: process.env.IMAP_PORT || 993, // imap port
tls: process.env.IMAP_TLS || true, // use secure connection?
authTimeout: process.env.IMAP_AUTHTIMEOUT || 3000, // timeout for auth
refreshIntervalSeconds: process.env.IMAP_REFRESH_INTERVAL_SECONDS || 60 // refresh interval
},
http: {
port: normalizePort(process.env.HTTP_PORT || 3000),
branding: process.env.HTTP_BRANDING || ["48hr.email", "CrazyCo", "https://crazyco.xyz"],
examples: process.env.HTTP_EXAMPLES || {
email: "example@48hr.email",
ids: [1, 2, 3]
port: normalizePort(process.env.HTTP_PORT || 3000), // http port
branding: process.env.HTTP_BRANDING || ["48hr.email", "CrazyCo", "https://crazyco.xyz"], // branding
examples: process.env.HTTP_EXAMPLES || {
email: "example@48hr.email", // example email
ids: [1, 2, 3] // example ids
}
},
}

View File

@ -1,6 +1,6 @@
{
"name": "48hr.email",
"version": "1.5.3",
"version": "1.5.4",
"private": false,
"scripts": {
"start": "node --trace-warnings ./app.js",