Skip to content

Commit e0e10df

Browse files
author
locdp
committed
chore(core): add port env #3
1 parent f1dc37b commit e0e10df

File tree

4 files changed

+12
-20
lines changed

4 files changed

+12
-20
lines changed

.env

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,9 @@ VITE_SOURCE_MAP=N
4444

4545
# Used to differentiate storage across different domains
4646
VITE_STORAGE_PREFIX=VNA_
47+
48+
# The port number on which the server is running
49+
VITE_SERVER_PORT=9527
50+
51+
# The port number used for previewing the application
52+
VITE_PREVIEW_PORT=9725

CHANGELOG.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +0,0 @@
1-
# Changelog
2-
3-
## [v0.0.2](https://github.com/dploc96/vue-naive-admin/compare/v0.0.1...v0.0.2) (2024-08-22)
4-
5-
###    ❤️ Contributors
6-
7-
## [v0.0.1](https://github.com/dploc96/vue-naive-admin/compare/undefined...v0.0.1) (2024-08-22)
8-
9-
###    🚀 Features
10-
11-
- **core**:
12-
- update project &nbsp;-&nbsp; by @dploc96 [<samp>(47d5d)</samp>](https://github.com/dploc96/vue-naive-admin/commit/47d5d1b)
13-
- update project &nbsp;-&nbsp; by @dploc96 [<samp>(627fe)</samp>](https://github.com/dploc96/vue-naive-admin/commit/627fe49)
14-
15-
### &nbsp;&nbsp;&nbsp;❤️ Contributors
16-
17-
[![dploc96](https://github.com/dploc96.png?size=48)](https://github.com/dploc96)&nbsp;&nbsp;
18-

src/typings/env.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ declare namespace Env {
103103
readonly VITE_ICONIFY_URL?: string
104104
/** Used to differentiate storage across different domains */
105105
readonly VITE_STORAGE_PREFIX?: string
106+
/** The port number on which the server is running */
107+
readonly VITE_SERVER_PORT?: number
108+
/** The port number used for previewing the application */
109+
readonly VITE_PREVIEW_PORT?: number
106110
}
107111

108112
/** Used in the runtime.config.js file */

vite.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ export default defineConfig((configEnv) => {
3333
},
3434
server: {
3535
host: '0.0.0.0',
36-
port: 9527,
36+
port: viteEnv.VITE_SERVER_PORT,
3737
open: true,
3838
proxy: createViteProxy(viteEnv, enableProxy),
3939
fs: {
4040
cachedChecks: false,
4141
},
4242
},
4343
preview: {
44-
port: 9725,
44+
port: viteEnv.VITE_PREVIEW_PORT,
4545
},
4646
build: {
4747
reportCompressedSize: false,

0 commit comments

Comments
 (0)