reorganize dirs for dockerize

This commit is contained in:
Danny Avila 2023-03-06 10:15:07 -05:00
parent 6ae154cc42
commit fca546af63
38 changed files with 1056 additions and 1970 deletions

View file

@ -0,0 +1,13 @@
const handleError = (res, errorMessage) => {
res.status(500).write(`event: error\ndata: ${errorMessage}`);
res.end();
};
const sendMessage = (res, message) => {
if (message.length === 0) {
return;
}
res.write(`event: message\ndata: ${JSON.stringify(message)}\n\n`);
};
module.exports = { handleError, sendMessage };