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": { "DOMAINS": {
"description": "Email domains" "description": "Email domains"
}, },
"DELETE_MAILS_OLDER_THAN_DAYS": { "EMAIL_PURGE_TIME": {
"description": "How many days to to wait before deleting messages", "description": "Config for when to purge the emails",
"value": 2 "value": {
"time": 48,
"unit": "hours",
"convert": true
}
}, },
"IMAP_USER": { "IMAP_USER": {
"description": "Username to login to the imap server" "description": "Username to login to the imap server"
@ -47,6 +51,13 @@
"HTTP_BRANDING": { "HTTP_BRANDING": {
"description": "The branding of the site", "description": "The branding of the site",
"value": ["48hr.email", "Crazyco", "https://crazyco.xyz"] "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 = { const config = {
email: { email: {
domains: process.env.EMAIL_DOMAINS, domains: process.env.EMAIL_DOMAINS, // List object of domains
purgeTime: process.env.PURGE_TIME || { purgeTime: process.env.EMAIL_PURGE_TIME || {
time: 48, time: 48, // Time value to purge
unit: 'hours', // minutes, hours, days unit: 'hours', // minutes, hours, days
convert: true, // Convert to highest sensible unit convert: true, // Convert to highest sensible unit
} }
}, },
imap: { imap: {
user: process.env.IMAP_USER, user: process.env.IMAP_USER, // imap user
password: process.env.IMAP_PASSWORD, password: process.env.IMAP_PASSWORD, // imap password
host: process.env.IMAP_SERVER, host: process.env.IMAP_SERVER, // imap server
port: process.env.IMAP_PORT || 993, port: process.env.IMAP_PORT || 993, // imap port
tls: process.env.IMAP_TLS || true, tls: process.env.IMAP_TLS || true, // use secure connection?
authTimeout: process.env.IMAP_AUTHTIMEOUT || 3000, authTimeout: process.env.IMAP_AUTHTIMEOUT || 3000, // timeout for auth
refreshIntervalSeconds: process.env.IMAP_REFRESH_INTERVAL_SECONDS || 60 refreshIntervalSeconds: process.env.IMAP_REFRESH_INTERVAL_SECONDS || 60 // refresh interval
}, },
http: { http: {
port: normalizePort(process.env.HTTP_PORT || 3000), port: normalizePort(process.env.HTTP_PORT || 3000), // http port
branding: process.env.HTTP_BRANDING || ["48hr.email", "CrazyCo", "https://crazyco.xyz"], branding: process.env.HTTP_BRANDING || ["48hr.email", "CrazyCo", "https://crazyco.xyz"], // branding
examples: process.env.HTTP_EXAMPLES || { examples: process.env.HTTP_EXAMPLES || {
email: "example@48hr.email", email: "example@48hr.email", // example email
ids: [1, 2, 3] ids: [1, 2, 3] // example ids
} }
}, },
} }

View File

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