modularize code, add dummy version of roverd

This commit is contained in:
legop3
2025-11-12 01:13:29 -05:00
parent b5ce6706d6
commit 73b1b44c35
41 changed files with 1018 additions and 401 deletions
+23
View File
@@ -0,0 +1,23 @@
const io = require('../globals/io');
const COLORS = {
info: '#2196f3',
success: '#4caf50',
warn: '#f0b651',
error: '#e53935',
};
function sendAlert({ color, title, message, ts = Date.now() }) {
const payload = {
color: color || COLORS.info,
title,
message,
ts,
};
io.emit('alert', payload);
}
module.exports = {
COLORS,
sendAlert,
};