fix: add Dockerfile, starter

This commit is contained in:
Leifer Mendez
2023-01-08 16:47:28 +01:00
parent 5e6077dd8f
commit 4e0d33c6bb
32 changed files with 1164 additions and 164 deletions

View File

@@ -1,12 +1,80 @@
<!DOCTYPE html>
<html lang="en">
<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" />
<title>Document</title>
<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>
<img src="qr.png" alt="" />
<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

@@ -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}`))

View File

@@ -1,12 +1,80 @@
<!DOCTYPE html>
<html lang="en">
<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" />
<title>Document</title>
<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>
<img src="qr.png" alt="" />
<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

@@ -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}`))

View File

@@ -1,12 +1,80 @@
<!DOCTYPE html>
<html lang="en">
<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" />
<title>Document</title>
<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>
<img src="qr.png" alt="" />
<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

@@ -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}`))

View File

@@ -1,12 +1,80 @@
<!DOCTYPE html>
<html lang="en">
<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" />
<title>Document</title>
<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>
<img src="qr.png" alt="" />
<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

@@ -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}`))

View File

@@ -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"]

View File

@@ -1,12 +1,80 @@
<!DOCTYPE html>
<html lang="en">
<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" />
<title>Document</title>
<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>
<img src="qr.png" alt="" />
<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

@@ -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}`))

View File

@@ -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"]

View File

@@ -1,12 +1,80 @@
<!DOCTYPE html>
<html lang="en">
<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" />
<title>Document</title>
<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>
<img src="qr.png" alt="" />
<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

@@ -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}`))

View File

@@ -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"]

View File

@@ -1,12 +1,80 @@
<!DOCTYPE html>
<html lang="en">
<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" />
<title>Document</title>
<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>
<img src="qr.png" alt="" />
<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

@@ -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}`))

View File

@@ -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"]

View File

@@ -1,12 +1,80 @@
<!DOCTYPE html>
<html lang="en">
<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" />
<title>Document</title>
<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>
<img src="qr.png" alt="" />
<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

@@ -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}`))

View File

@@ -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"]

View File

@@ -1,12 +1,80 @@
<!DOCTYPE html>
<html lang="en">
<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" />
<title>Document</title>
<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>
<img src="qr.png" alt="" />
<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

@@ -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}`))

View File

@@ -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"]

View File

@@ -1,12 +1,80 @@
<!DOCTYPE html>
<html lang="en">
<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" />
<title>Document</title>
<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>
<img src="qr.png" alt="" />
<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

@@ -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}`))

View File

@@ -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"]

View File

@@ -1,12 +1,80 @@
<!DOCTYPE html>
<html lang="en">
<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" />
<title>Document</title>
<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>
<img src="qr.png" alt="" />
<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

@@ -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}`))

View File

@@ -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"]

View File

@@ -1,12 +1,80 @@
<!DOCTYPE html>
<html lang="en">
<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" />
<title>Document</title>
<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>
<img src="qr.png" alt="" />
<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

@@ -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}`))