From 4f2fbaf21b09c1f39df11e6f372d8e018e4af9c2 Mon Sep 17 00:00:00 2001 From: leifermendez Date: Sat, 7 Jan 2023 16:57:18 +0000 Subject: [PATCH 1/2] =?UTF-8?q?ci(providers):=20=F0=9F=91=8D=20updated=20v?= =?UTF-8?q?ersions=20stable=20providers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From 4e0d33c6bb46ad259774f6d0c38c6c0b5f8ca4a9 Mon Sep 17 00:00:00 2001 From: Leifer Mendez Date: Sun, 8 Jan 2023 16:47:28 +0100 Subject: [PATCH 2/2] fix: :zap: add Dockerfile, starter --- .../apps/base-baileys-json/public/index.html | 74 ++++++++++++++++++- .../apps/base-baileys-json/server.http.js | 20 +++-- .../base-baileys-memory/public/index.html | 74 ++++++++++++++++++- .../apps/base-baileys-memory/server.http.js | 20 +++-- .../apps/base-baileys-mongo/public/index.html | 74 ++++++++++++++++++- .../apps/base-baileys-mongo/server.http.js | 20 +++-- .../apps/base-baileys-mysql/public/index.html | 74 ++++++++++++++++++- .../apps/base-baileys-mysql/server.http.js | 20 +++-- starters/apps/base-venom-json/Dockerfile | 25 ++++++- .../apps/base-venom-json/public/index.html | 74 ++++++++++++++++++- starters/apps/base-venom-json/server.http.js | 20 +++-- starters/apps/base-venom-memory/Dockerfile | 25 ++++++- .../apps/base-venom-memory/public/index.html | 74 ++++++++++++++++++- .../apps/base-venom-memory/server.http.js | 20 +++-- starters/apps/base-venom-mongo/Dockerfile | 25 ++++++- .../apps/base-venom-mongo/public/index.html | 74 ++++++++++++++++++- starters/apps/base-venom-mongo/server.http.js | 20 +++-- starters/apps/base-venom-mysql/Dockerfile | 25 ++++++- .../apps/base-venom-mysql/public/index.html | 74 ++++++++++++++++++- starters/apps/base-venom-mysql/server.http.js | 20 +++-- starters/apps/base-wweb-json/Dockerfile | 25 ++++++- .../apps/base-wweb-json/public/index.html | 74 ++++++++++++++++++- starters/apps/base-wweb-json/server.http.js | 20 +++-- starters/apps/base-wweb-memory/Dockerfile | 25 ++++++- .../apps/base-wweb-memory/public/index.html | 74 ++++++++++++++++++- starters/apps/base-wweb-memory/server.http.js | 20 +++-- starters/apps/base-wweb-mongo/Dockerfile | 25 ++++++- .../apps/base-wweb-mongo/public/index.html | 74 ++++++++++++++++++- starters/apps/base-wweb-mongo/server.http.js | 20 +++-- starters/apps/base-wweb-mysql/Dockerfile | 25 ++++++- .../apps/base-wweb-mysql/public/index.html | 74 ++++++++++++++++++- starters/apps/base-wweb-mysql/server.http.js | 20 +++-- 32 files changed, 1164 insertions(+), 164 deletions(-) diff --git a/starters/apps/base-baileys-json/public/index.html b/starters/apps/base-baileys-json/public/index.html index d193fae..202b50c 100644 --- a/starters/apps/base-baileys-json/public/index.html +++ b/starters/apps/base-baileys-json/public/index.html @@ -1,12 +1,80 @@ - + - Document + + + 🤖 Crear chatbot WhatsApp en minutos + - +
+ Escanear QR +
+

Whatsapp QR

+

+ F5 para actualizar, el codigo se actualiza cada minuto.
+ Con esta libreria, puedes configurar respuestas + automatizadas para preguntas frecuentes , recibir y + responder mensajes de manera automatizada, y hacer un + seguimiento de las interacciones con los clientes. Además, + nuestro Chatbot se integra fácilmente con otros sistemas y + herramientas que ya esté utilizando en su negocio. +

+
+ Ver documentación +
+
+
diff --git a/starters/apps/base-baileys-json/server.http.js b/starters/apps/base-baileys-json/server.http.js index 439f191..217bd71 100644 --- a/starters/apps/base-baileys-json/server.http.js +++ b/starters/apps/base-baileys-json/server.http.js @@ -1,6 +1,6 @@ -var http = require('http') -var fs = require('fs') -var path = require('path') +const http = require('http') +const fs = require('fs') +const path = require('path') const PORT = process.env.PORT || 3000 @@ -8,23 +8,27 @@ const PORT = process.env.PORT || 3000 * Levantar un HTTP Server */ http.createServer(function (req, res) { + var cssPath = undefined + var fileStream = undefined + var imagePath = undefined + if (req.url === '/') { fs.readFile('./public/index.html', 'UTF-8', function (err, html) { res.writeHead(200, { 'Content-Type': 'text/html' }) res.end(html) }) } else if (req.url.match('.css$')) { - var cssPath = path.join(__dirname, 'public', req.url) - var fileStream = fs.createReadStream(cssPath, 'UTF-8') + cssPath = path.join(__dirname, 'public', req.url) + fileStream = fs.createReadStream(cssPath, 'UTF-8') res.writeHead(200, { 'Content-Type': 'text/css' }) fileStream.pipe(res) } else if (req.url.match('.png$')) { - var imagePath = path.join(__dirname, req.url) - var fileStream = fs.createReadStream(imagePath) + imagePath = path.join(__dirname, req.url) + fileStream = fs.createReadStream(imagePath) res.writeHead(200, { 'Content-Type': 'image/png' }) fileStream.pipe(res) } else { res.writeHead(404, { 'Content-Type': 'text/html' }) res.end('No Page Found') } -}).listen(PORT, () => console.log(`Ready HTTP http://localhost:${PORT}`)) +}).listen(PORT, () => console.log(`Escanear QR Code http://localhost:${PORT}`)) diff --git a/starters/apps/base-baileys-memory/public/index.html b/starters/apps/base-baileys-memory/public/index.html index d193fae..202b50c 100644 --- a/starters/apps/base-baileys-memory/public/index.html +++ b/starters/apps/base-baileys-memory/public/index.html @@ -1,12 +1,80 @@ - + - Document + + + 🤖 Crear chatbot WhatsApp en minutos + - +
+ Escanear QR +
+

Whatsapp QR

+

+ F5 para actualizar, el codigo se actualiza cada minuto.
+ Con esta libreria, puedes configurar respuestas + automatizadas para preguntas frecuentes , recibir y + responder mensajes de manera automatizada, y hacer un + seguimiento de las interacciones con los clientes. Además, + nuestro Chatbot se integra fácilmente con otros sistemas y + herramientas que ya esté utilizando en su negocio. +

+
+ Ver documentación +
+
+
diff --git a/starters/apps/base-baileys-memory/server.http.js b/starters/apps/base-baileys-memory/server.http.js index 439f191..217bd71 100644 --- a/starters/apps/base-baileys-memory/server.http.js +++ b/starters/apps/base-baileys-memory/server.http.js @@ -1,6 +1,6 @@ -var http = require('http') -var fs = require('fs') -var path = require('path') +const http = require('http') +const fs = require('fs') +const path = require('path') const PORT = process.env.PORT || 3000 @@ -8,23 +8,27 @@ const PORT = process.env.PORT || 3000 * Levantar un HTTP Server */ http.createServer(function (req, res) { + var cssPath = undefined + var fileStream = undefined + var imagePath = undefined + if (req.url === '/') { fs.readFile('./public/index.html', 'UTF-8', function (err, html) { res.writeHead(200, { 'Content-Type': 'text/html' }) res.end(html) }) } else if (req.url.match('.css$')) { - var cssPath = path.join(__dirname, 'public', req.url) - var fileStream = fs.createReadStream(cssPath, 'UTF-8') + cssPath = path.join(__dirname, 'public', req.url) + fileStream = fs.createReadStream(cssPath, 'UTF-8') res.writeHead(200, { 'Content-Type': 'text/css' }) fileStream.pipe(res) } else if (req.url.match('.png$')) { - var imagePath = path.join(__dirname, req.url) - var fileStream = fs.createReadStream(imagePath) + imagePath = path.join(__dirname, req.url) + fileStream = fs.createReadStream(imagePath) res.writeHead(200, { 'Content-Type': 'image/png' }) fileStream.pipe(res) } else { res.writeHead(404, { 'Content-Type': 'text/html' }) res.end('No Page Found') } -}).listen(PORT, () => console.log(`Ready HTTP http://localhost:${PORT}`)) +}).listen(PORT, () => console.log(`Escanear QR Code http://localhost:${PORT}`)) diff --git a/starters/apps/base-baileys-mongo/public/index.html b/starters/apps/base-baileys-mongo/public/index.html index d193fae..202b50c 100644 --- a/starters/apps/base-baileys-mongo/public/index.html +++ b/starters/apps/base-baileys-mongo/public/index.html @@ -1,12 +1,80 @@ - + - Document + + + 🤖 Crear chatbot WhatsApp en minutos + - +
+ Escanear QR +
+

Whatsapp QR

+

+ F5 para actualizar, el codigo se actualiza cada minuto.
+ Con esta libreria, puedes configurar respuestas + automatizadas para preguntas frecuentes , recibir y + responder mensajes de manera automatizada, y hacer un + seguimiento de las interacciones con los clientes. Además, + nuestro Chatbot se integra fácilmente con otros sistemas y + herramientas que ya esté utilizando en su negocio. +

+
+ Ver documentación +
+
+
diff --git a/starters/apps/base-baileys-mongo/server.http.js b/starters/apps/base-baileys-mongo/server.http.js index 439f191..217bd71 100644 --- a/starters/apps/base-baileys-mongo/server.http.js +++ b/starters/apps/base-baileys-mongo/server.http.js @@ -1,6 +1,6 @@ -var http = require('http') -var fs = require('fs') -var path = require('path') +const http = require('http') +const fs = require('fs') +const path = require('path') const PORT = process.env.PORT || 3000 @@ -8,23 +8,27 @@ const PORT = process.env.PORT || 3000 * Levantar un HTTP Server */ http.createServer(function (req, res) { + var cssPath = undefined + var fileStream = undefined + var imagePath = undefined + if (req.url === '/') { fs.readFile('./public/index.html', 'UTF-8', function (err, html) { res.writeHead(200, { 'Content-Type': 'text/html' }) res.end(html) }) } else if (req.url.match('.css$')) { - var cssPath = path.join(__dirname, 'public', req.url) - var fileStream = fs.createReadStream(cssPath, 'UTF-8') + cssPath = path.join(__dirname, 'public', req.url) + fileStream = fs.createReadStream(cssPath, 'UTF-8') res.writeHead(200, { 'Content-Type': 'text/css' }) fileStream.pipe(res) } else if (req.url.match('.png$')) { - var imagePath = path.join(__dirname, req.url) - var fileStream = fs.createReadStream(imagePath) + imagePath = path.join(__dirname, req.url) + fileStream = fs.createReadStream(imagePath) res.writeHead(200, { 'Content-Type': 'image/png' }) fileStream.pipe(res) } else { res.writeHead(404, { 'Content-Type': 'text/html' }) res.end('No Page Found') } -}).listen(PORT, () => console.log(`Ready HTTP http://localhost:${PORT}`)) +}).listen(PORT, () => console.log(`Escanear QR Code http://localhost:${PORT}`)) diff --git a/starters/apps/base-baileys-mysql/public/index.html b/starters/apps/base-baileys-mysql/public/index.html index d193fae..202b50c 100644 --- a/starters/apps/base-baileys-mysql/public/index.html +++ b/starters/apps/base-baileys-mysql/public/index.html @@ -1,12 +1,80 @@ - + - Document + + + 🤖 Crear chatbot WhatsApp en minutos + - +
+ Escanear QR +
+

Whatsapp QR

+

+ F5 para actualizar, el codigo se actualiza cada minuto.
+ Con esta libreria, puedes configurar respuestas + automatizadas para preguntas frecuentes , recibir y + responder mensajes de manera automatizada, y hacer un + seguimiento de las interacciones con los clientes. Además, + nuestro Chatbot se integra fácilmente con otros sistemas y + herramientas que ya esté utilizando en su negocio. +

+
+ Ver documentación +
+
+
diff --git a/starters/apps/base-baileys-mysql/server.http.js b/starters/apps/base-baileys-mysql/server.http.js index 439f191..217bd71 100644 --- a/starters/apps/base-baileys-mysql/server.http.js +++ b/starters/apps/base-baileys-mysql/server.http.js @@ -1,6 +1,6 @@ -var http = require('http') -var fs = require('fs') -var path = require('path') +const http = require('http') +const fs = require('fs') +const path = require('path') const PORT = process.env.PORT || 3000 @@ -8,23 +8,27 @@ const PORT = process.env.PORT || 3000 * Levantar un HTTP Server */ http.createServer(function (req, res) { + var cssPath = undefined + var fileStream = undefined + var imagePath = undefined + if (req.url === '/') { fs.readFile('./public/index.html', 'UTF-8', function (err, html) { res.writeHead(200, { 'Content-Type': 'text/html' }) res.end(html) }) } else if (req.url.match('.css$')) { - var cssPath = path.join(__dirname, 'public', req.url) - var fileStream = fs.createReadStream(cssPath, 'UTF-8') + cssPath = path.join(__dirname, 'public', req.url) + fileStream = fs.createReadStream(cssPath, 'UTF-8') res.writeHead(200, { 'Content-Type': 'text/css' }) fileStream.pipe(res) } else if (req.url.match('.png$')) { - var imagePath = path.join(__dirname, req.url) - var fileStream = fs.createReadStream(imagePath) + imagePath = path.join(__dirname, req.url) + fileStream = fs.createReadStream(imagePath) res.writeHead(200, { 'Content-Type': 'image/png' }) fileStream.pipe(res) } else { res.writeHead(404, { 'Content-Type': 'text/html' }) res.end('No Page Found') } -}).listen(PORT, () => console.log(`Ready HTTP http://localhost:${PORT}`)) +}).listen(PORT, () => console.log(`Escanear QR Code http://localhost:${PORT}`)) diff --git a/starters/apps/base-venom-json/Dockerfile b/starters/apps/base-venom-json/Dockerfile index 14b07b2..3a9aa17 100644 --- a/starters/apps/base-venom-json/Dockerfile +++ b/starters/apps/base-venom-json/Dockerfile @@ -1,7 +1,24 @@ -FROM node:lts-bullseye as bot +FROM node:18-alpine as node + WORKDIR /app -COPY package*.json ./ -RUN npm i +# Installs latest Chromium (92) package. +RUN apk add --no-cache \ + chromium \ + nss \ + freetype \ + harfbuzz \ + ca-certificates \ + ttf-freefont \ + nodejs \ + yarn + +# Tell Puppeteer to skip installing Chrome. We'll be using the installed package. +ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \ + PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser + +# Puppeteer v10.0.0 works with Chromium 92. COPY . . -ARG PORT +RUN npm install puppeteer@10.0.0 +RUN npm install + CMD ["npm", "start"] diff --git a/starters/apps/base-venom-json/public/index.html b/starters/apps/base-venom-json/public/index.html index d193fae..202b50c 100644 --- a/starters/apps/base-venom-json/public/index.html +++ b/starters/apps/base-venom-json/public/index.html @@ -1,12 +1,80 @@ - + - Document + + + 🤖 Crear chatbot WhatsApp en minutos + - +
+ Escanear QR +
+

Whatsapp QR

+

+ F5 para actualizar, el codigo se actualiza cada minuto.
+ Con esta libreria, puedes configurar respuestas + automatizadas para preguntas frecuentes , recibir y + responder mensajes de manera automatizada, y hacer un + seguimiento de las interacciones con los clientes. Además, + nuestro Chatbot se integra fácilmente con otros sistemas y + herramientas que ya esté utilizando en su negocio. +

+
+ Ver documentación +
+
+
diff --git a/starters/apps/base-venom-json/server.http.js b/starters/apps/base-venom-json/server.http.js index 439f191..217bd71 100644 --- a/starters/apps/base-venom-json/server.http.js +++ b/starters/apps/base-venom-json/server.http.js @@ -1,6 +1,6 @@ -var http = require('http') -var fs = require('fs') -var path = require('path') +const http = require('http') +const fs = require('fs') +const path = require('path') const PORT = process.env.PORT || 3000 @@ -8,23 +8,27 @@ const PORT = process.env.PORT || 3000 * Levantar un HTTP Server */ http.createServer(function (req, res) { + var cssPath = undefined + var fileStream = undefined + var imagePath = undefined + if (req.url === '/') { fs.readFile('./public/index.html', 'UTF-8', function (err, html) { res.writeHead(200, { 'Content-Type': 'text/html' }) res.end(html) }) } else if (req.url.match('.css$')) { - var cssPath = path.join(__dirname, 'public', req.url) - var fileStream = fs.createReadStream(cssPath, 'UTF-8') + cssPath = path.join(__dirname, 'public', req.url) + fileStream = fs.createReadStream(cssPath, 'UTF-8') res.writeHead(200, { 'Content-Type': 'text/css' }) fileStream.pipe(res) } else if (req.url.match('.png$')) { - var imagePath = path.join(__dirname, req.url) - var fileStream = fs.createReadStream(imagePath) + imagePath = path.join(__dirname, req.url) + fileStream = fs.createReadStream(imagePath) res.writeHead(200, { 'Content-Type': 'image/png' }) fileStream.pipe(res) } else { res.writeHead(404, { 'Content-Type': 'text/html' }) res.end('No Page Found') } -}).listen(PORT, () => console.log(`Ready HTTP http://localhost:${PORT}`)) +}).listen(PORT, () => console.log(`Escanear QR Code http://localhost:${PORT}`)) diff --git a/starters/apps/base-venom-memory/Dockerfile b/starters/apps/base-venom-memory/Dockerfile index 14b07b2..3a9aa17 100644 --- a/starters/apps/base-venom-memory/Dockerfile +++ b/starters/apps/base-venom-memory/Dockerfile @@ -1,7 +1,24 @@ -FROM node:lts-bullseye as bot +FROM node:18-alpine as node + WORKDIR /app -COPY package*.json ./ -RUN npm i +# Installs latest Chromium (92) package. +RUN apk add --no-cache \ + chromium \ + nss \ + freetype \ + harfbuzz \ + ca-certificates \ + ttf-freefont \ + nodejs \ + yarn + +# Tell Puppeteer to skip installing Chrome. We'll be using the installed package. +ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \ + PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser + +# Puppeteer v10.0.0 works with Chromium 92. COPY . . -ARG PORT +RUN npm install puppeteer@10.0.0 +RUN npm install + CMD ["npm", "start"] diff --git a/starters/apps/base-venom-memory/public/index.html b/starters/apps/base-venom-memory/public/index.html index d193fae..202b50c 100644 --- a/starters/apps/base-venom-memory/public/index.html +++ b/starters/apps/base-venom-memory/public/index.html @@ -1,12 +1,80 @@ - + - Document + + + 🤖 Crear chatbot WhatsApp en minutos + - +
+ Escanear QR +
+

Whatsapp QR

+

+ F5 para actualizar, el codigo se actualiza cada minuto.
+ Con esta libreria, puedes configurar respuestas + automatizadas para preguntas frecuentes , recibir y + responder mensajes de manera automatizada, y hacer un + seguimiento de las interacciones con los clientes. Además, + nuestro Chatbot se integra fácilmente con otros sistemas y + herramientas que ya esté utilizando en su negocio. +

+
+ Ver documentación +
+
+
diff --git a/starters/apps/base-venom-memory/server.http.js b/starters/apps/base-venom-memory/server.http.js index 439f191..217bd71 100644 --- a/starters/apps/base-venom-memory/server.http.js +++ b/starters/apps/base-venom-memory/server.http.js @@ -1,6 +1,6 @@ -var http = require('http') -var fs = require('fs') -var path = require('path') +const http = require('http') +const fs = require('fs') +const path = require('path') const PORT = process.env.PORT || 3000 @@ -8,23 +8,27 @@ const PORT = process.env.PORT || 3000 * Levantar un HTTP Server */ http.createServer(function (req, res) { + var cssPath = undefined + var fileStream = undefined + var imagePath = undefined + if (req.url === '/') { fs.readFile('./public/index.html', 'UTF-8', function (err, html) { res.writeHead(200, { 'Content-Type': 'text/html' }) res.end(html) }) } else if (req.url.match('.css$')) { - var cssPath = path.join(__dirname, 'public', req.url) - var fileStream = fs.createReadStream(cssPath, 'UTF-8') + cssPath = path.join(__dirname, 'public', req.url) + fileStream = fs.createReadStream(cssPath, 'UTF-8') res.writeHead(200, { 'Content-Type': 'text/css' }) fileStream.pipe(res) } else if (req.url.match('.png$')) { - var imagePath = path.join(__dirname, req.url) - var fileStream = fs.createReadStream(imagePath) + imagePath = path.join(__dirname, req.url) + fileStream = fs.createReadStream(imagePath) res.writeHead(200, { 'Content-Type': 'image/png' }) fileStream.pipe(res) } else { res.writeHead(404, { 'Content-Type': 'text/html' }) res.end('No Page Found') } -}).listen(PORT, () => console.log(`Ready HTTP http://localhost:${PORT}`)) +}).listen(PORT, () => console.log(`Escanear QR Code http://localhost:${PORT}`)) diff --git a/starters/apps/base-venom-mongo/Dockerfile b/starters/apps/base-venom-mongo/Dockerfile index 14b07b2..3a9aa17 100644 --- a/starters/apps/base-venom-mongo/Dockerfile +++ b/starters/apps/base-venom-mongo/Dockerfile @@ -1,7 +1,24 @@ -FROM node:lts-bullseye as bot +FROM node:18-alpine as node + WORKDIR /app -COPY package*.json ./ -RUN npm i +# Installs latest Chromium (92) package. +RUN apk add --no-cache \ + chromium \ + nss \ + freetype \ + harfbuzz \ + ca-certificates \ + ttf-freefont \ + nodejs \ + yarn + +# Tell Puppeteer to skip installing Chrome. We'll be using the installed package. +ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \ + PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser + +# Puppeteer v10.0.0 works with Chromium 92. COPY . . -ARG PORT +RUN npm install puppeteer@10.0.0 +RUN npm install + CMD ["npm", "start"] diff --git a/starters/apps/base-venom-mongo/public/index.html b/starters/apps/base-venom-mongo/public/index.html index d193fae..202b50c 100644 --- a/starters/apps/base-venom-mongo/public/index.html +++ b/starters/apps/base-venom-mongo/public/index.html @@ -1,12 +1,80 @@ - + - Document + + + 🤖 Crear chatbot WhatsApp en minutos + - +
+ Escanear QR +
+

Whatsapp QR

+

+ F5 para actualizar, el codigo se actualiza cada minuto.
+ Con esta libreria, puedes configurar respuestas + automatizadas para preguntas frecuentes , recibir y + responder mensajes de manera automatizada, y hacer un + seguimiento de las interacciones con los clientes. Además, + nuestro Chatbot se integra fácilmente con otros sistemas y + herramientas que ya esté utilizando en su negocio. +

+
+ Ver documentación +
+
+
diff --git a/starters/apps/base-venom-mongo/server.http.js b/starters/apps/base-venom-mongo/server.http.js index 439f191..217bd71 100644 --- a/starters/apps/base-venom-mongo/server.http.js +++ b/starters/apps/base-venom-mongo/server.http.js @@ -1,6 +1,6 @@ -var http = require('http') -var fs = require('fs') -var path = require('path') +const http = require('http') +const fs = require('fs') +const path = require('path') const PORT = process.env.PORT || 3000 @@ -8,23 +8,27 @@ const PORT = process.env.PORT || 3000 * Levantar un HTTP Server */ http.createServer(function (req, res) { + var cssPath = undefined + var fileStream = undefined + var imagePath = undefined + if (req.url === '/') { fs.readFile('./public/index.html', 'UTF-8', function (err, html) { res.writeHead(200, { 'Content-Type': 'text/html' }) res.end(html) }) } else if (req.url.match('.css$')) { - var cssPath = path.join(__dirname, 'public', req.url) - var fileStream = fs.createReadStream(cssPath, 'UTF-8') + cssPath = path.join(__dirname, 'public', req.url) + fileStream = fs.createReadStream(cssPath, 'UTF-8') res.writeHead(200, { 'Content-Type': 'text/css' }) fileStream.pipe(res) } else if (req.url.match('.png$')) { - var imagePath = path.join(__dirname, req.url) - var fileStream = fs.createReadStream(imagePath) + imagePath = path.join(__dirname, req.url) + fileStream = fs.createReadStream(imagePath) res.writeHead(200, { 'Content-Type': 'image/png' }) fileStream.pipe(res) } else { res.writeHead(404, { 'Content-Type': 'text/html' }) res.end('No Page Found') } -}).listen(PORT, () => console.log(`Ready HTTP http://localhost:${PORT}`)) +}).listen(PORT, () => console.log(`Escanear QR Code http://localhost:${PORT}`)) diff --git a/starters/apps/base-venom-mysql/Dockerfile b/starters/apps/base-venom-mysql/Dockerfile index 14b07b2..3a9aa17 100644 --- a/starters/apps/base-venom-mysql/Dockerfile +++ b/starters/apps/base-venom-mysql/Dockerfile @@ -1,7 +1,24 @@ -FROM node:lts-bullseye as bot +FROM node:18-alpine as node + WORKDIR /app -COPY package*.json ./ -RUN npm i +# Installs latest Chromium (92) package. +RUN apk add --no-cache \ + chromium \ + nss \ + freetype \ + harfbuzz \ + ca-certificates \ + ttf-freefont \ + nodejs \ + yarn + +# Tell Puppeteer to skip installing Chrome. We'll be using the installed package. +ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \ + PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser + +# Puppeteer v10.0.0 works with Chromium 92. COPY . . -ARG PORT +RUN npm install puppeteer@10.0.0 +RUN npm install + CMD ["npm", "start"] diff --git a/starters/apps/base-venom-mysql/public/index.html b/starters/apps/base-venom-mysql/public/index.html index d193fae..202b50c 100644 --- a/starters/apps/base-venom-mysql/public/index.html +++ b/starters/apps/base-venom-mysql/public/index.html @@ -1,12 +1,80 @@ - + - Document + + + 🤖 Crear chatbot WhatsApp en minutos + - +
+ Escanear QR +
+

Whatsapp QR

+

+ F5 para actualizar, el codigo se actualiza cada minuto.
+ Con esta libreria, puedes configurar respuestas + automatizadas para preguntas frecuentes , recibir y + responder mensajes de manera automatizada, y hacer un + seguimiento de las interacciones con los clientes. Además, + nuestro Chatbot se integra fácilmente con otros sistemas y + herramientas que ya esté utilizando en su negocio. +

+
+ Ver documentación +
+
+
diff --git a/starters/apps/base-venom-mysql/server.http.js b/starters/apps/base-venom-mysql/server.http.js index 439f191..217bd71 100644 --- a/starters/apps/base-venom-mysql/server.http.js +++ b/starters/apps/base-venom-mysql/server.http.js @@ -1,6 +1,6 @@ -var http = require('http') -var fs = require('fs') -var path = require('path') +const http = require('http') +const fs = require('fs') +const path = require('path') const PORT = process.env.PORT || 3000 @@ -8,23 +8,27 @@ const PORT = process.env.PORT || 3000 * Levantar un HTTP Server */ http.createServer(function (req, res) { + var cssPath = undefined + var fileStream = undefined + var imagePath = undefined + if (req.url === '/') { fs.readFile('./public/index.html', 'UTF-8', function (err, html) { res.writeHead(200, { 'Content-Type': 'text/html' }) res.end(html) }) } else if (req.url.match('.css$')) { - var cssPath = path.join(__dirname, 'public', req.url) - var fileStream = fs.createReadStream(cssPath, 'UTF-8') + cssPath = path.join(__dirname, 'public', req.url) + fileStream = fs.createReadStream(cssPath, 'UTF-8') res.writeHead(200, { 'Content-Type': 'text/css' }) fileStream.pipe(res) } else if (req.url.match('.png$')) { - var imagePath = path.join(__dirname, req.url) - var fileStream = fs.createReadStream(imagePath) + imagePath = path.join(__dirname, req.url) + fileStream = fs.createReadStream(imagePath) res.writeHead(200, { 'Content-Type': 'image/png' }) fileStream.pipe(res) } else { res.writeHead(404, { 'Content-Type': 'text/html' }) res.end('No Page Found') } -}).listen(PORT, () => console.log(`Ready HTTP http://localhost:${PORT}`)) +}).listen(PORT, () => console.log(`Escanear QR Code http://localhost:${PORT}`)) diff --git a/starters/apps/base-wweb-json/Dockerfile b/starters/apps/base-wweb-json/Dockerfile index 14b07b2..3a9aa17 100644 --- a/starters/apps/base-wweb-json/Dockerfile +++ b/starters/apps/base-wweb-json/Dockerfile @@ -1,7 +1,24 @@ -FROM node:lts-bullseye as bot +FROM node:18-alpine as node + WORKDIR /app -COPY package*.json ./ -RUN npm i +# Installs latest Chromium (92) package. +RUN apk add --no-cache \ + chromium \ + nss \ + freetype \ + harfbuzz \ + ca-certificates \ + ttf-freefont \ + nodejs \ + yarn + +# Tell Puppeteer to skip installing Chrome. We'll be using the installed package. +ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \ + PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser + +# Puppeteer v10.0.0 works with Chromium 92. COPY . . -ARG PORT +RUN npm install puppeteer@10.0.0 +RUN npm install + CMD ["npm", "start"] diff --git a/starters/apps/base-wweb-json/public/index.html b/starters/apps/base-wweb-json/public/index.html index d193fae..202b50c 100644 --- a/starters/apps/base-wweb-json/public/index.html +++ b/starters/apps/base-wweb-json/public/index.html @@ -1,12 +1,80 @@ - + - Document + + + 🤖 Crear chatbot WhatsApp en minutos + - +
+ Escanear QR +
+

Whatsapp QR

+

+ F5 para actualizar, el codigo se actualiza cada minuto.
+ Con esta libreria, puedes configurar respuestas + automatizadas para preguntas frecuentes , recibir y + responder mensajes de manera automatizada, y hacer un + seguimiento de las interacciones con los clientes. Además, + nuestro Chatbot se integra fácilmente con otros sistemas y + herramientas que ya esté utilizando en su negocio. +

+
+ Ver documentación +
+
+
diff --git a/starters/apps/base-wweb-json/server.http.js b/starters/apps/base-wweb-json/server.http.js index 439f191..217bd71 100644 --- a/starters/apps/base-wweb-json/server.http.js +++ b/starters/apps/base-wweb-json/server.http.js @@ -1,6 +1,6 @@ -var http = require('http') -var fs = require('fs') -var path = require('path') +const http = require('http') +const fs = require('fs') +const path = require('path') const PORT = process.env.PORT || 3000 @@ -8,23 +8,27 @@ const PORT = process.env.PORT || 3000 * Levantar un HTTP Server */ http.createServer(function (req, res) { + var cssPath = undefined + var fileStream = undefined + var imagePath = undefined + if (req.url === '/') { fs.readFile('./public/index.html', 'UTF-8', function (err, html) { res.writeHead(200, { 'Content-Type': 'text/html' }) res.end(html) }) } else if (req.url.match('.css$')) { - var cssPath = path.join(__dirname, 'public', req.url) - var fileStream = fs.createReadStream(cssPath, 'UTF-8') + cssPath = path.join(__dirname, 'public', req.url) + fileStream = fs.createReadStream(cssPath, 'UTF-8') res.writeHead(200, { 'Content-Type': 'text/css' }) fileStream.pipe(res) } else if (req.url.match('.png$')) { - var imagePath = path.join(__dirname, req.url) - var fileStream = fs.createReadStream(imagePath) + imagePath = path.join(__dirname, req.url) + fileStream = fs.createReadStream(imagePath) res.writeHead(200, { 'Content-Type': 'image/png' }) fileStream.pipe(res) } else { res.writeHead(404, { 'Content-Type': 'text/html' }) res.end('No Page Found') } -}).listen(PORT, () => console.log(`Ready HTTP http://localhost:${PORT}`)) +}).listen(PORT, () => console.log(`Escanear QR Code http://localhost:${PORT}`)) diff --git a/starters/apps/base-wweb-memory/Dockerfile b/starters/apps/base-wweb-memory/Dockerfile index 14b07b2..3a9aa17 100644 --- a/starters/apps/base-wweb-memory/Dockerfile +++ b/starters/apps/base-wweb-memory/Dockerfile @@ -1,7 +1,24 @@ -FROM node:lts-bullseye as bot +FROM node:18-alpine as node + WORKDIR /app -COPY package*.json ./ -RUN npm i +# Installs latest Chromium (92) package. +RUN apk add --no-cache \ + chromium \ + nss \ + freetype \ + harfbuzz \ + ca-certificates \ + ttf-freefont \ + nodejs \ + yarn + +# Tell Puppeteer to skip installing Chrome. We'll be using the installed package. +ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \ + PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser + +# Puppeteer v10.0.0 works with Chromium 92. COPY . . -ARG PORT +RUN npm install puppeteer@10.0.0 +RUN npm install + CMD ["npm", "start"] diff --git a/starters/apps/base-wweb-memory/public/index.html b/starters/apps/base-wweb-memory/public/index.html index d193fae..202b50c 100644 --- a/starters/apps/base-wweb-memory/public/index.html +++ b/starters/apps/base-wweb-memory/public/index.html @@ -1,12 +1,80 @@ - + - Document + + + 🤖 Crear chatbot WhatsApp en minutos + - +
+ Escanear QR +
+

Whatsapp QR

+

+ F5 para actualizar, el codigo se actualiza cada minuto.
+ Con esta libreria, puedes configurar respuestas + automatizadas para preguntas frecuentes , recibir y + responder mensajes de manera automatizada, y hacer un + seguimiento de las interacciones con los clientes. Además, + nuestro Chatbot se integra fácilmente con otros sistemas y + herramientas que ya esté utilizando en su negocio. +

+
+ Ver documentación +
+
+
diff --git a/starters/apps/base-wweb-memory/server.http.js b/starters/apps/base-wweb-memory/server.http.js index 439f191..217bd71 100644 --- a/starters/apps/base-wweb-memory/server.http.js +++ b/starters/apps/base-wweb-memory/server.http.js @@ -1,6 +1,6 @@ -var http = require('http') -var fs = require('fs') -var path = require('path') +const http = require('http') +const fs = require('fs') +const path = require('path') const PORT = process.env.PORT || 3000 @@ -8,23 +8,27 @@ const PORT = process.env.PORT || 3000 * Levantar un HTTP Server */ http.createServer(function (req, res) { + var cssPath = undefined + var fileStream = undefined + var imagePath = undefined + if (req.url === '/') { fs.readFile('./public/index.html', 'UTF-8', function (err, html) { res.writeHead(200, { 'Content-Type': 'text/html' }) res.end(html) }) } else if (req.url.match('.css$')) { - var cssPath = path.join(__dirname, 'public', req.url) - var fileStream = fs.createReadStream(cssPath, 'UTF-8') + cssPath = path.join(__dirname, 'public', req.url) + fileStream = fs.createReadStream(cssPath, 'UTF-8') res.writeHead(200, { 'Content-Type': 'text/css' }) fileStream.pipe(res) } else if (req.url.match('.png$')) { - var imagePath = path.join(__dirname, req.url) - var fileStream = fs.createReadStream(imagePath) + imagePath = path.join(__dirname, req.url) + fileStream = fs.createReadStream(imagePath) res.writeHead(200, { 'Content-Type': 'image/png' }) fileStream.pipe(res) } else { res.writeHead(404, { 'Content-Type': 'text/html' }) res.end('No Page Found') } -}).listen(PORT, () => console.log(`Ready HTTP http://localhost:${PORT}`)) +}).listen(PORT, () => console.log(`Escanear QR Code http://localhost:${PORT}`)) diff --git a/starters/apps/base-wweb-mongo/Dockerfile b/starters/apps/base-wweb-mongo/Dockerfile index 14b07b2..3a9aa17 100644 --- a/starters/apps/base-wweb-mongo/Dockerfile +++ b/starters/apps/base-wweb-mongo/Dockerfile @@ -1,7 +1,24 @@ -FROM node:lts-bullseye as bot +FROM node:18-alpine as node + WORKDIR /app -COPY package*.json ./ -RUN npm i +# Installs latest Chromium (92) package. +RUN apk add --no-cache \ + chromium \ + nss \ + freetype \ + harfbuzz \ + ca-certificates \ + ttf-freefont \ + nodejs \ + yarn + +# Tell Puppeteer to skip installing Chrome. We'll be using the installed package. +ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \ + PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser + +# Puppeteer v10.0.0 works with Chromium 92. COPY . . -ARG PORT +RUN npm install puppeteer@10.0.0 +RUN npm install + CMD ["npm", "start"] diff --git a/starters/apps/base-wweb-mongo/public/index.html b/starters/apps/base-wweb-mongo/public/index.html index d193fae..202b50c 100644 --- a/starters/apps/base-wweb-mongo/public/index.html +++ b/starters/apps/base-wweb-mongo/public/index.html @@ -1,12 +1,80 @@ - + - Document + + + 🤖 Crear chatbot WhatsApp en minutos + - +
+ Escanear QR +
+

Whatsapp QR

+

+ F5 para actualizar, el codigo se actualiza cada minuto.
+ Con esta libreria, puedes configurar respuestas + automatizadas para preguntas frecuentes , recibir y + responder mensajes de manera automatizada, y hacer un + seguimiento de las interacciones con los clientes. Además, + nuestro Chatbot se integra fácilmente con otros sistemas y + herramientas que ya esté utilizando en su negocio. +

+
+ Ver documentación +
+
+
diff --git a/starters/apps/base-wweb-mongo/server.http.js b/starters/apps/base-wweb-mongo/server.http.js index 439f191..217bd71 100644 --- a/starters/apps/base-wweb-mongo/server.http.js +++ b/starters/apps/base-wweb-mongo/server.http.js @@ -1,6 +1,6 @@ -var http = require('http') -var fs = require('fs') -var path = require('path') +const http = require('http') +const fs = require('fs') +const path = require('path') const PORT = process.env.PORT || 3000 @@ -8,23 +8,27 @@ const PORT = process.env.PORT || 3000 * Levantar un HTTP Server */ http.createServer(function (req, res) { + var cssPath = undefined + var fileStream = undefined + var imagePath = undefined + if (req.url === '/') { fs.readFile('./public/index.html', 'UTF-8', function (err, html) { res.writeHead(200, { 'Content-Type': 'text/html' }) res.end(html) }) } else if (req.url.match('.css$')) { - var cssPath = path.join(__dirname, 'public', req.url) - var fileStream = fs.createReadStream(cssPath, 'UTF-8') + cssPath = path.join(__dirname, 'public', req.url) + fileStream = fs.createReadStream(cssPath, 'UTF-8') res.writeHead(200, { 'Content-Type': 'text/css' }) fileStream.pipe(res) } else if (req.url.match('.png$')) { - var imagePath = path.join(__dirname, req.url) - var fileStream = fs.createReadStream(imagePath) + imagePath = path.join(__dirname, req.url) + fileStream = fs.createReadStream(imagePath) res.writeHead(200, { 'Content-Type': 'image/png' }) fileStream.pipe(res) } else { res.writeHead(404, { 'Content-Type': 'text/html' }) res.end('No Page Found') } -}).listen(PORT, () => console.log(`Ready HTTP http://localhost:${PORT}`)) +}).listen(PORT, () => console.log(`Escanear QR Code http://localhost:${PORT}`)) diff --git a/starters/apps/base-wweb-mysql/Dockerfile b/starters/apps/base-wweb-mysql/Dockerfile index 14b07b2..3a9aa17 100644 --- a/starters/apps/base-wweb-mysql/Dockerfile +++ b/starters/apps/base-wweb-mysql/Dockerfile @@ -1,7 +1,24 @@ -FROM node:lts-bullseye as bot +FROM node:18-alpine as node + WORKDIR /app -COPY package*.json ./ -RUN npm i +# Installs latest Chromium (92) package. +RUN apk add --no-cache \ + chromium \ + nss \ + freetype \ + harfbuzz \ + ca-certificates \ + ttf-freefont \ + nodejs \ + yarn + +# Tell Puppeteer to skip installing Chrome. We'll be using the installed package. +ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \ + PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser + +# Puppeteer v10.0.0 works with Chromium 92. COPY . . -ARG PORT +RUN npm install puppeteer@10.0.0 +RUN npm install + CMD ["npm", "start"] diff --git a/starters/apps/base-wweb-mysql/public/index.html b/starters/apps/base-wweb-mysql/public/index.html index d193fae..202b50c 100644 --- a/starters/apps/base-wweb-mysql/public/index.html +++ b/starters/apps/base-wweb-mysql/public/index.html @@ -1,12 +1,80 @@ - + - Document + + + 🤖 Crear chatbot WhatsApp en minutos + - +
+ Escanear QR +
+

Whatsapp QR

+

+ F5 para actualizar, el codigo se actualiza cada minuto.
+ Con esta libreria, puedes configurar respuestas + automatizadas para preguntas frecuentes , recibir y + responder mensajes de manera automatizada, y hacer un + seguimiento de las interacciones con los clientes. Además, + nuestro Chatbot se integra fácilmente con otros sistemas y + herramientas que ya esté utilizando en su negocio. +

+
+ Ver documentación +
+
+
diff --git a/starters/apps/base-wweb-mysql/server.http.js b/starters/apps/base-wweb-mysql/server.http.js index 439f191..217bd71 100644 --- a/starters/apps/base-wweb-mysql/server.http.js +++ b/starters/apps/base-wweb-mysql/server.http.js @@ -1,6 +1,6 @@ -var http = require('http') -var fs = require('fs') -var path = require('path') +const http = require('http') +const fs = require('fs') +const path = require('path') const PORT = process.env.PORT || 3000 @@ -8,23 +8,27 @@ const PORT = process.env.PORT || 3000 * Levantar un HTTP Server */ http.createServer(function (req, res) { + var cssPath = undefined + var fileStream = undefined + var imagePath = undefined + if (req.url === '/') { fs.readFile('./public/index.html', 'UTF-8', function (err, html) { res.writeHead(200, { 'Content-Type': 'text/html' }) res.end(html) }) } else if (req.url.match('.css$')) { - var cssPath = path.join(__dirname, 'public', req.url) - var fileStream = fs.createReadStream(cssPath, 'UTF-8') + cssPath = path.join(__dirname, 'public', req.url) + fileStream = fs.createReadStream(cssPath, 'UTF-8') res.writeHead(200, { 'Content-Type': 'text/css' }) fileStream.pipe(res) } else if (req.url.match('.png$')) { - var imagePath = path.join(__dirname, req.url) - var fileStream = fs.createReadStream(imagePath) + imagePath = path.join(__dirname, req.url) + fileStream = fs.createReadStream(imagePath) res.writeHead(200, { 'Content-Type': 'image/png' }) fileStream.pipe(res) } else { res.writeHead(404, { 'Content-Type': 'text/html' }) res.end('No Page Found') } -}).listen(PORT, () => console.log(`Ready HTTP http://localhost:${PORT}`)) +}).listen(PORT, () => console.log(`Escanear QR Code http://localhost:${PORT}`))