Skip to content

Commit

Permalink
Configure dotenv
Browse files Browse the repository at this point in the history
fix lint issue

resolved some file Path

added .env.example
  • Loading branch information
13XAVI committed Jun 7, 2024
1 parent 1d4ea43 commit 094b745
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ coverage
*.njsproj
*.sln
*.sw?
.env
12 changes: 12 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"dependencies": {
"@reduxjs/toolkit": "^2.2.5",
"axios": "^1.7.2",
"dotenv": "^16.4.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-redux": "^9.1.2",
Expand Down
1 change: 1 addition & 0 deletions src/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
APP_PORT=
4 changes: 3 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';
import dotenv from 'dotenv';

dotenv.config();
// vite.config.ts
export default defineConfig({
plugins: [react()],
server: {
host: true,
strictPort: true,
port: 8080,
port: process.env.APP_PORT ? parseInt(process.env.APP_PORT, 10) : undefined,
},
test: {
globals: true,
Expand Down

0 comments on commit 094b745

Please sign in to comment.