22 lines
547 B
JavaScript
22 lines
547 B
JavaScript
// frontend/vite.config.js
|
|
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import fs from 'node:fs';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
host: ('trackaccess.gallaudet.edu', 'localhost'), // bind 0.0.0.0 so external hosts can reach it
|
|
port: 8080,
|
|
strictPort: true, // fail if 5173 in use
|
|
https: {
|
|
key: fs.readFileSync('trackaccess.key'),
|
|
cert: fs.readFileSync('trackaccess.crt'),
|
|
},
|
|
proxy: {
|
|
'/api': 'http://localhost:4000'
|
|
}
|
|
}
|
|
});
|
|
|