fix: add Dockerfile, starter

fix:  add Dockerfile, starter
This commit is contained in:
Leifer Mendez
2023-01-08 16:51:06 +01:00
committed by GitHub
55 changed files with 1622 additions and 5 deletions

4
.gitignore vendored
View File

@@ -14,6 +14,10 @@ mediaSend/*
!mediaSend/nota-de-voz.mp3
.env
.wwebjs_auth
/session
/session/*
/tokens
/tokens/*
packages/cli/config.json
config.json
.yarnrc.yml

View File

@@ -1,6 +1,6 @@
{
"name": "@bot-whatsapp/bot",
"version": "0.0.44-alpha.0",
"version": "0.0.45-alpha.0",
"description": "",
"main": "./lib/bundle.bot.cjs",
"scripts": {

View File

@@ -1,6 +1,6 @@
{
"name": "@bot-whatsapp/cli",
"version": "0.0.51-alpha.0",
"version": "0.0.52-alpha.0",
"description": "",
"main": "index.js",
"devDependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "create-bot-whatsapp",
"version": "0.0.62-alpha.0",
"version": "0.0.63-alpha.0",
"description": "",
"main": "./lib/bundle.create-bot-whatsapp.cjs",
"files": [

View File

@@ -1,6 +1,6 @@
{
"name": "@bot-whatsapp/database",
"version": "0.0.43-alpha.0",
"version": "0.0.44-alpha.0",
"description": "Esto es el conector a mysql, pg, mongo",
"main": "./lib/mock/index.cjs",
"keywords": [],

View File

@@ -1,6 +1,6 @@
{
"name": "@bot-whatsapp/provider",
"version": "0.0.49-alpha.0",
"version": "0.0.50-alpha.0",
"description": "Esto es el conector a Twilio, Meta, etc...",
"main": "./lib/mock/index.cjs",
"keywords": [],

View File

@@ -24,6 +24,7 @@ class WebWhatsappProvider extends ProviderClass {
super()
this.vendor = new Client({
authStrategy: new LocalAuth(),
puppeteer: { headless: true, args: ['--no-sandbox', '--disable-setuid-sandbox', '--unhandled-rejections=strict'] }
})
const listEvents = this.busEvents()

View File

@@ -0,0 +1,7 @@
FROM node:lts-bullseye as bot
WORKDIR /app
COPY package*.json ./
RUN npm i
COPY . .
ARG PORT
CMD ["npm", "start"]

View File

@@ -5,6 +5,8 @@ const {
addKeyword,
} = require('@bot-whatsapp/bot')
require('./server.http')
const BaileysProvider = require('@bot-whatsapp/provider/baileys')
const JsonFileAdapter = require('@bot-whatsapp/database/json')

View File

@@ -0,0 +1,80 @@
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://rsms.me/" />
<link rel="stylesheet" href="https://rsms.me/inter/inter.css" />
<title>🤖 Crear chatbot WhatsApp en minutos</title>
<style>
html,
body {
display: flex;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
justify-content: center;
align-self: center;
align-items: center;
font-family: 'Inter', sans-serif;
}
</style>
</head>
<body>
<div
style="
display: flex;
gap: 2rem;
justify-content: center;
align-items: center;
"
>
<img
style="
box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px,
rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;
border-radius: 15px;
object-fit: contain;
"
width="400"
height="400"
src="qr.png"
alt="Escanear QR"
/>
<div style="width: 400px; display: grid; gap: 1rem">
<h1 style="margin: 0">Whatsapp QR</h1>
<p>
<strong
>F5 para actualizar, el codigo se actualiza cada minuto. </strong
><br />
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.
</p>
<div>
<a
target="_blank"
style="
background: white;
box-shadow: rgb(0 0 0 / 16%) 0px 10px 36px 0px,
rgb(0 0 0 / 6%) 0px 0px 0px 1px;
padding: 10px;
border-radius: 5px;
font-weight: 600;
text-decoration: none;
color: #1a1a1a;
border: solid 1px #afafaf;
"
href="https://bot-whatsapp.netlify.app/"
>Ver documentación</a
>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,34 @@
const http = require('http')
const fs = require('fs')
const path = require('path')
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$')) {
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$')) {
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(`Escanear QR Code http://localhost:${PORT}`))

View File

@@ -0,0 +1,7 @@
FROM node:lts-bullseye as bot
WORKDIR /app
COPY package*.json ./
RUN npm i
COPY . .
ARG PORT
CMD ["npm", "start"]

View File

@@ -5,6 +5,8 @@ const {
addKeyword,
} = require('@bot-whatsapp/bot')
require('./server.http')
const BaileysProvider = require('@bot-whatsapp/provider/baileys')
const MockAdapter = require('@bot-whatsapp/database/mock')

View File

@@ -0,0 +1,80 @@
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://rsms.me/" />
<link rel="stylesheet" href="https://rsms.me/inter/inter.css" />
<title>🤖 Crear chatbot WhatsApp en minutos</title>
<style>
html,
body {
display: flex;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
justify-content: center;
align-self: center;
align-items: center;
font-family: 'Inter', sans-serif;
}
</style>
</head>
<body>
<div
style="
display: flex;
gap: 2rem;
justify-content: center;
align-items: center;
"
>
<img
style="
box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px,
rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;
border-radius: 15px;
object-fit: contain;
"
width="400"
height="400"
src="qr.png"
alt="Escanear QR"
/>
<div style="width: 400px; display: grid; gap: 1rem">
<h1 style="margin: 0">Whatsapp QR</h1>
<p>
<strong
>F5 para actualizar, el codigo se actualiza cada minuto. </strong
><br />
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.
</p>
<div>
<a
target="_blank"
style="
background: white;
box-shadow: rgb(0 0 0 / 16%) 0px 10px 36px 0px,
rgb(0 0 0 / 6%) 0px 0px 0px 1px;
padding: 10px;
border-radius: 5px;
font-weight: 600;
text-decoration: none;
color: #1a1a1a;
border: solid 1px #afafaf;
"
href="https://bot-whatsapp.netlify.app/"
>Ver documentación</a
>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,34 @@
const http = require('http')
const fs = require('fs')
const path = require('path')
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$')) {
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$')) {
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(`Escanear QR Code http://localhost:${PORT}`))

View File

@@ -0,0 +1,7 @@
FROM node:lts-bullseye as bot
WORKDIR /app
COPY package*.json ./
RUN npm i
COPY . .
ARG PORT
CMD ["npm", "start"]

View File

@@ -5,6 +5,8 @@ const {
addKeyword,
} = require('@bot-whatsapp/bot')
require('./server.http')
const BaileysProvider = require('@bot-whatsapp/provider/baileys')
const MongoAdapter = require('@bot-whatsapp/database/mongo')

View File

@@ -0,0 +1,80 @@
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://rsms.me/" />
<link rel="stylesheet" href="https://rsms.me/inter/inter.css" />
<title>🤖 Crear chatbot WhatsApp en minutos</title>
<style>
html,
body {
display: flex;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
justify-content: center;
align-self: center;
align-items: center;
font-family: 'Inter', sans-serif;
}
</style>
</head>
<body>
<div
style="
display: flex;
gap: 2rem;
justify-content: center;
align-items: center;
"
>
<img
style="
box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px,
rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;
border-radius: 15px;
object-fit: contain;
"
width="400"
height="400"
src="qr.png"
alt="Escanear QR"
/>
<div style="width: 400px; display: grid; gap: 1rem">
<h1 style="margin: 0">Whatsapp QR</h1>
<p>
<strong
>F5 para actualizar, el codigo se actualiza cada minuto. </strong
><br />
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.
</p>
<div>
<a
target="_blank"
style="
background: white;
box-shadow: rgb(0 0 0 / 16%) 0px 10px 36px 0px,
rgb(0 0 0 / 6%) 0px 0px 0px 1px;
padding: 10px;
border-radius: 5px;
font-weight: 600;
text-decoration: none;
color: #1a1a1a;
border: solid 1px #afafaf;
"
href="https://bot-whatsapp.netlify.app/"
>Ver documentación</a
>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,34 @@
const http = require('http')
const fs = require('fs')
const path = require('path')
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$')) {
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$')) {
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(`Escanear QR Code http://localhost:${PORT}`))

View File

@@ -0,0 +1,7 @@
FROM node:lts-bullseye as bot
WORKDIR /app
COPY package*.json ./
RUN npm i
COPY . .
ARG PORT
CMD ["npm", "start"]

View File

@@ -5,6 +5,8 @@ const {
addKeyword,
} = require('@bot-whatsapp/bot')
require('./server.http')
const BaileysProvider = require('@bot-whatsapp/provider/baileys')
const MySQLAdapter = require('@bot-whatsapp/database/mysql')

View File

@@ -0,0 +1,80 @@
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://rsms.me/" />
<link rel="stylesheet" href="https://rsms.me/inter/inter.css" />
<title>🤖 Crear chatbot WhatsApp en minutos</title>
<style>
html,
body {
display: flex;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
justify-content: center;
align-self: center;
align-items: center;
font-family: 'Inter', sans-serif;
}
</style>
</head>
<body>
<div
style="
display: flex;
gap: 2rem;
justify-content: center;
align-items: center;
"
>
<img
style="
box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px,
rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;
border-radius: 15px;
object-fit: contain;
"
width="400"
height="400"
src="qr.png"
alt="Escanear QR"
/>
<div style="width: 400px; display: grid; gap: 1rem">
<h1 style="margin: 0">Whatsapp QR</h1>
<p>
<strong
>F5 para actualizar, el codigo se actualiza cada minuto. </strong
><br />
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.
</p>
<div>
<a
target="_blank"
style="
background: white;
box-shadow: rgb(0 0 0 / 16%) 0px 10px 36px 0px,
rgb(0 0 0 / 6%) 0px 0px 0px 1px;
padding: 10px;
border-radius: 5px;
font-weight: 600;
text-decoration: none;
color: #1a1a1a;
border: solid 1px #afafaf;
"
href="https://bot-whatsapp.netlify.app/"
>Ver documentación</a
>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,34 @@
const http = require('http')
const fs = require('fs')
const path = require('path')
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$')) {
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$')) {
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(`Escanear QR Code http://localhost:${PORT}`))

View File

@@ -0,0 +1,24 @@
FROM node:18-alpine as node
WORKDIR /app
# 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 . .
RUN npm install puppeteer@10.0.0
RUN npm install
CMD ["npm", "start"]

View File

@@ -5,6 +5,8 @@ const {
addKeyword,
} = require('@bot-whatsapp/bot')
require('./server.http')
const VenomProvider = require('@bot-whatsapp/provider/venom')
const JsonFileAdapter = require('@bot-whatsapp/database/json')

View File

@@ -0,0 +1,80 @@
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://rsms.me/" />
<link rel="stylesheet" href="https://rsms.me/inter/inter.css" />
<title>🤖 Crear chatbot WhatsApp en minutos</title>
<style>
html,
body {
display: flex;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
justify-content: center;
align-self: center;
align-items: center;
font-family: 'Inter', sans-serif;
}
</style>
</head>
<body>
<div
style="
display: flex;
gap: 2rem;
justify-content: center;
align-items: center;
"
>
<img
style="
box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px,
rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;
border-radius: 15px;
object-fit: contain;
"
width="400"
height="400"
src="qr.png"
alt="Escanear QR"
/>
<div style="width: 400px; display: grid; gap: 1rem">
<h1 style="margin: 0">Whatsapp QR</h1>
<p>
<strong
>F5 para actualizar, el codigo se actualiza cada minuto. </strong
><br />
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.
</p>
<div>
<a
target="_blank"
style="
background: white;
box-shadow: rgb(0 0 0 / 16%) 0px 10px 36px 0px,
rgb(0 0 0 / 6%) 0px 0px 0px 1px;
padding: 10px;
border-radius: 5px;
font-weight: 600;
text-decoration: none;
color: #1a1a1a;
border: solid 1px #afafaf;
"
href="https://bot-whatsapp.netlify.app/"
>Ver documentación</a
>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,34 @@
const http = require('http')
const fs = require('fs')
const path = require('path')
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$')) {
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$')) {
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(`Escanear QR Code http://localhost:${PORT}`))

View File

@@ -0,0 +1,24 @@
FROM node:18-alpine as node
WORKDIR /app
# 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 . .
RUN npm install puppeteer@10.0.0
RUN npm install
CMD ["npm", "start"]

View File

@@ -5,6 +5,8 @@ const {
addKeyword,
} = require('@bot-whatsapp/bot')
require('./server.http')
const VenomProvider = require('@bot-whatsapp/provider/venom')
const MockAdapter = require('@bot-whatsapp/database/mock')

View File

@@ -0,0 +1,80 @@
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://rsms.me/" />
<link rel="stylesheet" href="https://rsms.me/inter/inter.css" />
<title>🤖 Crear chatbot WhatsApp en minutos</title>
<style>
html,
body {
display: flex;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
justify-content: center;
align-self: center;
align-items: center;
font-family: 'Inter', sans-serif;
}
</style>
</head>
<body>
<div
style="
display: flex;
gap: 2rem;
justify-content: center;
align-items: center;
"
>
<img
style="
box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px,
rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;
border-radius: 15px;
object-fit: contain;
"
width="400"
height="400"
src="qr.png"
alt="Escanear QR"
/>
<div style="width: 400px; display: grid; gap: 1rem">
<h1 style="margin: 0">Whatsapp QR</h1>
<p>
<strong
>F5 para actualizar, el codigo se actualiza cada minuto. </strong
><br />
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.
</p>
<div>
<a
target="_blank"
style="
background: white;
box-shadow: rgb(0 0 0 / 16%) 0px 10px 36px 0px,
rgb(0 0 0 / 6%) 0px 0px 0px 1px;
padding: 10px;
border-radius: 5px;
font-weight: 600;
text-decoration: none;
color: #1a1a1a;
border: solid 1px #afafaf;
"
href="https://bot-whatsapp.netlify.app/"
>Ver documentación</a
>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,34 @@
const http = require('http')
const fs = require('fs')
const path = require('path')
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$')) {
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$')) {
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(`Escanear QR Code http://localhost:${PORT}`))

View File

@@ -0,0 +1,24 @@
FROM node:18-alpine as node
WORKDIR /app
# 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 . .
RUN npm install puppeteer@10.0.0
RUN npm install
CMD ["npm", "start"]

View File

@@ -5,6 +5,8 @@ const {
addKeyword,
} = require('@bot-whatsapp/bot')
require('./server.http')
const VenomProvider = require('@bot-whatsapp/provider/venom')
const MongoAdapter = require('@bot-whatsapp/database/mongo')

View File

@@ -0,0 +1,80 @@
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://rsms.me/" />
<link rel="stylesheet" href="https://rsms.me/inter/inter.css" />
<title>🤖 Crear chatbot WhatsApp en minutos</title>
<style>
html,
body {
display: flex;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
justify-content: center;
align-self: center;
align-items: center;
font-family: 'Inter', sans-serif;
}
</style>
</head>
<body>
<div
style="
display: flex;
gap: 2rem;
justify-content: center;
align-items: center;
"
>
<img
style="
box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px,
rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;
border-radius: 15px;
object-fit: contain;
"
width="400"
height="400"
src="qr.png"
alt="Escanear QR"
/>
<div style="width: 400px; display: grid; gap: 1rem">
<h1 style="margin: 0">Whatsapp QR</h1>
<p>
<strong
>F5 para actualizar, el codigo se actualiza cada minuto. </strong
><br />
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.
</p>
<div>
<a
target="_blank"
style="
background: white;
box-shadow: rgb(0 0 0 / 16%) 0px 10px 36px 0px,
rgb(0 0 0 / 6%) 0px 0px 0px 1px;
padding: 10px;
border-radius: 5px;
font-weight: 600;
text-decoration: none;
color: #1a1a1a;
border: solid 1px #afafaf;
"
href="https://bot-whatsapp.netlify.app/"
>Ver documentación</a
>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,34 @@
const http = require('http')
const fs = require('fs')
const path = require('path')
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$')) {
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$')) {
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(`Escanear QR Code http://localhost:${PORT}`))

View File

@@ -0,0 +1,24 @@
FROM node:18-alpine as node
WORKDIR /app
# 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 . .
RUN npm install puppeteer@10.0.0
RUN npm install
CMD ["npm", "start"]

View File

@@ -5,6 +5,8 @@ const {
addKeyword,
} = require('@bot-whatsapp/bot')
require('./server.http')
const VenomProvider = require('@bot-whatsapp/provider/venom')
const MySQLAdapter = require('@bot-whatsapp/database/mysql')

View File

@@ -0,0 +1,80 @@
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://rsms.me/" />
<link rel="stylesheet" href="https://rsms.me/inter/inter.css" />
<title>🤖 Crear chatbot WhatsApp en minutos</title>
<style>
html,
body {
display: flex;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
justify-content: center;
align-self: center;
align-items: center;
font-family: 'Inter', sans-serif;
}
</style>
</head>
<body>
<div
style="
display: flex;
gap: 2rem;
justify-content: center;
align-items: center;
"
>
<img
style="
box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px,
rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;
border-radius: 15px;
object-fit: contain;
"
width="400"
height="400"
src="qr.png"
alt="Escanear QR"
/>
<div style="width: 400px; display: grid; gap: 1rem">
<h1 style="margin: 0">Whatsapp QR</h1>
<p>
<strong
>F5 para actualizar, el codigo se actualiza cada minuto. </strong
><br />
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.
</p>
<div>
<a
target="_blank"
style="
background: white;
box-shadow: rgb(0 0 0 / 16%) 0px 10px 36px 0px,
rgb(0 0 0 / 6%) 0px 0px 0px 1px;
padding: 10px;
border-radius: 5px;
font-weight: 600;
text-decoration: none;
color: #1a1a1a;
border: solid 1px #afafaf;
"
href="https://bot-whatsapp.netlify.app/"
>Ver documentación</a
>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,34 @@
const http = require('http')
const fs = require('fs')
const path = require('path')
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$')) {
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$')) {
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(`Escanear QR Code http://localhost:${PORT}`))

View File

@@ -0,0 +1,24 @@
FROM node:18-alpine as node
WORKDIR /app
# 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 . .
RUN npm install puppeteer@10.0.0
RUN npm install
CMD ["npm", "start"]

View File

@@ -5,6 +5,8 @@ const {
addKeyword,
} = require('@bot-whatsapp/bot')
require('./server.http')
const WebWhatsappProvider = require('@bot-whatsapp/provider/web-whatsapp')
const JsonFileAdapter = require('@bot-whatsapp/database/json')

View File

@@ -0,0 +1,80 @@
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://rsms.me/" />
<link rel="stylesheet" href="https://rsms.me/inter/inter.css" />
<title>🤖 Crear chatbot WhatsApp en minutos</title>
<style>
html,
body {
display: flex;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
justify-content: center;
align-self: center;
align-items: center;
font-family: 'Inter', sans-serif;
}
</style>
</head>
<body>
<div
style="
display: flex;
gap: 2rem;
justify-content: center;
align-items: center;
"
>
<img
style="
box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px,
rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;
border-radius: 15px;
object-fit: contain;
"
width="400"
height="400"
src="qr.png"
alt="Escanear QR"
/>
<div style="width: 400px; display: grid; gap: 1rem">
<h1 style="margin: 0">Whatsapp QR</h1>
<p>
<strong
>F5 para actualizar, el codigo se actualiza cada minuto. </strong
><br />
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.
</p>
<div>
<a
target="_blank"
style="
background: white;
box-shadow: rgb(0 0 0 / 16%) 0px 10px 36px 0px,
rgb(0 0 0 / 6%) 0px 0px 0px 1px;
padding: 10px;
border-radius: 5px;
font-weight: 600;
text-decoration: none;
color: #1a1a1a;
border: solid 1px #afafaf;
"
href="https://bot-whatsapp.netlify.app/"
>Ver documentación</a
>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,34 @@
const http = require('http')
const fs = require('fs')
const path = require('path')
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$')) {
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$')) {
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(`Escanear QR Code http://localhost:${PORT}`))

View File

@@ -0,0 +1,24 @@
FROM node:18-alpine as node
WORKDIR /app
# 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 . .
RUN npm install puppeteer@10.0.0
RUN npm install
CMD ["npm", "start"]

View File

@@ -5,6 +5,8 @@ const {
addKeyword,
} = require('@bot-whatsapp/bot')
require('./server.http')
const WebWhatsappProvider = require('@bot-whatsapp/provider/web-whatsapp')
const MockAdapter = require('@bot-whatsapp/database/mock')

View File

@@ -0,0 +1,80 @@
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://rsms.me/" />
<link rel="stylesheet" href="https://rsms.me/inter/inter.css" />
<title>🤖 Crear chatbot WhatsApp en minutos</title>
<style>
html,
body {
display: flex;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
justify-content: center;
align-self: center;
align-items: center;
font-family: 'Inter', sans-serif;
}
</style>
</head>
<body>
<div
style="
display: flex;
gap: 2rem;
justify-content: center;
align-items: center;
"
>
<img
style="
box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px,
rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;
border-radius: 15px;
object-fit: contain;
"
width="400"
height="400"
src="qr.png"
alt="Escanear QR"
/>
<div style="width: 400px; display: grid; gap: 1rem">
<h1 style="margin: 0">Whatsapp QR</h1>
<p>
<strong
>F5 para actualizar, el codigo se actualiza cada minuto. </strong
><br />
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.
</p>
<div>
<a
target="_blank"
style="
background: white;
box-shadow: rgb(0 0 0 / 16%) 0px 10px 36px 0px,
rgb(0 0 0 / 6%) 0px 0px 0px 1px;
padding: 10px;
border-radius: 5px;
font-weight: 600;
text-decoration: none;
color: #1a1a1a;
border: solid 1px #afafaf;
"
href="https://bot-whatsapp.netlify.app/"
>Ver documentación</a
>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,34 @@
const http = require('http')
const fs = require('fs')
const path = require('path')
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$')) {
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$')) {
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(`Escanear QR Code http://localhost:${PORT}`))

View File

@@ -0,0 +1,24 @@
FROM node:18-alpine as node
WORKDIR /app
# 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 . .
RUN npm install puppeteer@10.0.0
RUN npm install
CMD ["npm", "start"]

View File

@@ -8,6 +8,8 @@ const {
const WebWhatsappProvider = require('@bot-whatsapp/provider/web-whatsapp')
const MongoAdapter = require('@bot-whatsapp/database/mongo')
require('./server.http')
/**
* Declaramos las conexiones de Mongo
*/

View File

@@ -0,0 +1,80 @@
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://rsms.me/" />
<link rel="stylesheet" href="https://rsms.me/inter/inter.css" />
<title>🤖 Crear chatbot WhatsApp en minutos</title>
<style>
html,
body {
display: flex;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
justify-content: center;
align-self: center;
align-items: center;
font-family: 'Inter', sans-serif;
}
</style>
</head>
<body>
<div
style="
display: flex;
gap: 2rem;
justify-content: center;
align-items: center;
"
>
<img
style="
box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px,
rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;
border-radius: 15px;
object-fit: contain;
"
width="400"
height="400"
src="qr.png"
alt="Escanear QR"
/>
<div style="width: 400px; display: grid; gap: 1rem">
<h1 style="margin: 0">Whatsapp QR</h1>
<p>
<strong
>F5 para actualizar, el codigo se actualiza cada minuto. </strong
><br />
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.
</p>
<div>
<a
target="_blank"
style="
background: white;
box-shadow: rgb(0 0 0 / 16%) 0px 10px 36px 0px,
rgb(0 0 0 / 6%) 0px 0px 0px 1px;
padding: 10px;
border-radius: 5px;
font-weight: 600;
text-decoration: none;
color: #1a1a1a;
border: solid 1px #afafaf;
"
href="https://bot-whatsapp.netlify.app/"
>Ver documentación</a
>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,34 @@
const http = require('http')
const fs = require('fs')
const path = require('path')
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$')) {
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$')) {
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(`Escanear QR Code http://localhost:${PORT}`))

View File

@@ -0,0 +1,24 @@
FROM node:18-alpine as node
WORKDIR /app
# 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 . .
RUN npm install puppeteer@10.0.0
RUN npm install
CMD ["npm", "start"]

View File

@@ -5,6 +5,8 @@ const {
addKeyword,
} = require('@bot-whatsapp/bot')
require('./server.http')
const WebWhatsappProvider = require('@bot-whatsapp/provider/web-whatsapp')
const MySQLAdapter = require('@bot-whatsapp/database/mysql')

View File

@@ -0,0 +1,80 @@
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://rsms.me/" />
<link rel="stylesheet" href="https://rsms.me/inter/inter.css" />
<title>🤖 Crear chatbot WhatsApp en minutos</title>
<style>
html,
body {
display: flex;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
justify-content: center;
align-self: center;
align-items: center;
font-family: 'Inter', sans-serif;
}
</style>
</head>
<body>
<div
style="
display: flex;
gap: 2rem;
justify-content: center;
align-items: center;
"
>
<img
style="
box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px,
rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;
border-radius: 15px;
object-fit: contain;
"
width="400"
height="400"
src="qr.png"
alt="Escanear QR"
/>
<div style="width: 400px; display: grid; gap: 1rem">
<h1 style="margin: 0">Whatsapp QR</h1>
<p>
<strong
>F5 para actualizar, el codigo se actualiza cada minuto. </strong
><br />
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.
</p>
<div>
<a
target="_blank"
style="
background: white;
box-shadow: rgb(0 0 0 / 16%) 0px 10px 36px 0px,
rgb(0 0 0 / 6%) 0px 0px 0px 1px;
padding: 10px;
border-radius: 5px;
font-weight: 600;
text-decoration: none;
color: #1a1a1a;
border: solid 1px #afafaf;
"
href="https://bot-whatsapp.netlify.app/"
>Ver documentación</a
>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,34 @@
const http = require('http')
const fs = require('fs')
const path = require('path')
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$')) {
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$')) {
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(`Escanear QR Code http://localhost:${PORT}`))