import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { fileURLToPath, URL } from 'node:url';
const resolvePath = (relative: string): string =>
fileURLToPath(new URL(relative, import.meta.url));
import express, { Express, NextFunction, Request, Response } from 'express';
import { userRoutes } from './userRoutes';
function authenticate(req: Request, res: Response, next: NextFunction) {
const header = req.header('authorization');
if (!header || !header.startsWith('Bearer ')) {