feat: API

This commit is contained in:
2023-02-27 09:05:23 -06:00
parent 552cb408aa
commit d598427d42
9 changed files with 404 additions and 57 deletions

View File

@@ -1,7 +1,15 @@
const express = require('express');
const router = express.Router()
const { getQr } = require('../controllers/web')
var path = require('path');
router.use('/qr', getQr)
// router.use('/qr', getQr)
var staticFilesPath0 = path.resolve('./', 'public');
var staticFilesPath = path.resolve('./', 'public/index.html');
console.log(staticFilesPath)
router.use(express.static(staticFilesPath0));
router.get('/', (req, res) => {
res.sendFile(staticFilesPath)
});
module.exports = router