redirect to home index
This commit is contained in:
parent
857885cb4f
commit
91a6016d3d
@ -1,6 +1,7 @@
|
||||
import express from "express";
|
||||
import DoorRouter from "./routers/DoorRouter";
|
||||
import { initializeRandomDoorPins } from "./middlewares/DoorAuthModes";
|
||||
import path from "path";
|
||||
|
||||
const Fingerprint = require('express-fingerprint');
|
||||
const app = express();
|
||||
@ -23,8 +24,8 @@ app.use(express.json());
|
||||
app.use(express.static("dist"));
|
||||
app.use('/api/door', DoorRouter);
|
||||
|
||||
app.all('*', function(req, res) {
|
||||
res.redirect('/');
|
||||
app.get("*", (req, res) => {
|
||||
res.sendFile(path.join(__dirname, "dist", "index.html"));
|
||||
});
|
||||
|
||||
app.listen(5000, async () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user