0a9588abb7
- Add pagination support to findAll (page, limit query params) - Add findByTemplateId method to service - Add GET /by-template/:templateId endpoint to controller - Service already includes CRUD for QuestionBank and QuestionBankItem
40 lines
1.0 KiB
TypeScript
40 lines
1.0 KiB
TypeScript
import path from 'path';
|
|
import { defineConfig, loadEnv } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
const env = loadEnv(mode, '.', '');
|
|
return {
|
|
server: {
|
|
port: Number(env.VITE_PORT) || 13001,
|
|
host: env.VITE_HOST || '0.0.0.0',
|
|
proxy: {
|
|
'/api': {
|
|
target: env.VITE_BACKEND_URL || 'http://localhost:3001',
|
|
changeOrigin: true,
|
|
},
|
|
'/uploads': {
|
|
target: env.VITE_BACKEND_URL || 'http://localhost:3001',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
plugins: [tailwindcss() as any, react()],
|
|
define: {
|
|
'process.env.API_KEY': JSON.stringify(env.GEMINI_API_KEY),
|
|
'process.env.GEMINI_API_KEY': JSON.stringify(env.GEMINI_API_KEY)
|
|
},
|
|
optimizeDeps: {
|
|
exclude: ['tailwindcss']
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, '.'),
|
|
}
|
|
},
|
|
publicDir: 'public'
|
|
};
|
|
});
|
|
// touch
|