Merge pull request #407 from codigoencasa/feature/qr-file-name

feat:  qr code filename
This commit is contained in:
Leifer Mendez
2023-01-09 19:45:03 +01:00
committed by GitHub
7 changed files with 21 additions and 13 deletions

View File

@@ -19,13 +19,15 @@ const serve = require('serve-static')(dir)
* Iniciamos Portal WEB para escanear QR
* @param {port:3000, publicSite:'http://mistio.com', qrFile:'qr.png', dir:__dirname}
*/
const start = (
{ port, publicSite, qrFile } = {
const start = (args) => {
const injectArgs = {
port: HTTP_PORT,
publicSite: PUBLIC_URL,
qrFile: QR_FILE,
...args,
}
) => {
const { port, publicSite, qrFile } = injectArgs
polka()
.use(serve)
.get(qrFile, (_, res) => {