Use env vars

This commit is contained in:
schroda
2025-08-02 23:13:50 +02:00
parent 4f5754399b
commit 5543e134fa
16 changed files with 63 additions and 46 deletions

View File

@@ -14,6 +14,7 @@ import react from '@vitejs/plugin-react-swc';
import viteTsconfigPaths from 'vite-tsconfig-paths';
import legacy from '@vitejs/plugin-legacy';
import { nodePolyfills } from 'vite-plugin-node-polyfills';
import 'dotenv/config';
// eslint-disable-next-line import/no-default-export
export default defineConfig(() => ({
@@ -21,7 +22,8 @@ export default defineConfig(() => ({
outDir: 'build',
},
server: {
port: 3000,
port: Number(process.env.PORT),
allowedHosts: process.env.ALLOWED_HOSTS.split(','),
},
resolve: {
alias: {