preparando worker y api test endpoint
All checks were successful
build-and-push / build (push) Successful in 12s
build-and-push / deploy (push) Successful in 14s

This commit is contained in:
2025-05-14 16:32:59 -06:00
parent 2858a5e9be
commit 04a19dab46
3 changed files with 8 additions and 1 deletions

View File

@@ -13,4 +13,10 @@ app.get('/api/items', async (req, res) => {
const { rows } = await pool.query('SELECT * FROM items');
res.json(rows);
});
app.get('/api/test', async (req, res) => {
// hello world
res.json({ message: 'Hello World' });
});
app.listen(4000, ()=> console.log('API corriendo en :4000'));

View File

@@ -14,4 +14,5 @@ COPY cron/ /etc/periodic/
RUN chmod +x /etc/periodic/*/*
# arranca cron (en background) y luego Node
CMD sh -c "crond -l 2 & node cron-worker.js"
CMD sh -c "crond -f & node cron-worker.js"