Skip to content

Commit

Permalink
Configure dotenv (#19)
Browse files Browse the repository at this point in the history
* Configure dotenv

fix lint issue

resolved some file Path

added .env.example

* moved .env.example
  • Loading branch information
13XAVI authored Jun 7, 2024
1 parent 1d4ea43 commit 3fd4bb9
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
APP_PORT=
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
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 3fd4bb9

Please sign in to comment.