mirror of
https://github.com/JefferyHcool/BiliNote.git
synced 2026-07-11 23:41:41 +08:00
refactor(.gitignore and vite.config): 更新忽略文件配置和前端端口设置
- 在 .gitignore 文件中添加 backend/config/* 和 BiliNo 到忽略列表 - 移除 BiliNote_frontend/.idea/* 以便于前端项目的重构 - 在 vite.config.ts 中添加前端端口配置,使用环境变量或默认值 3015 - 修改服务器端口配置,使用新设置的前端端口
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -319,4 +319,5 @@ cython_debug/
|
|||||||
/backend/bili_note.db
|
/backend/bili_note.db
|
||||||
/backend/uploads/*
|
/backend/uploads/*
|
||||||
/backend/.idea/*
|
/backend/.idea/*
|
||||||
|
/backend/config/*
|
||||||
/BiliNote_frontend/.idea/*
|
/BiliNote_frontend/.idea/*
|
||||||
@@ -8,6 +8,7 @@ export default defineConfig(({ mode }) => {
|
|||||||
const env = loadEnv(mode, process.cwd() + '/../')
|
const env = loadEnv(mode, process.cwd() + '/../')
|
||||||
|
|
||||||
const apiBaseUrl = env.VITE_API_BASE_URL
|
const apiBaseUrl = env.VITE_API_BASE_URL
|
||||||
|
const port = env.FRONTEND_PORT || 3015
|
||||||
|
|
||||||
return {
|
return {
|
||||||
plugins: [react(), tailwindcss()],
|
plugins: [react(), tailwindcss()],
|
||||||
@@ -18,7 +19,7 @@ export default defineConfig(({ mode }) => {
|
|||||||
},
|
},
|
||||||
server: {
|
server: {
|
||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
port: 5173,
|
port: port,
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
target: apiBaseUrl,
|
target: apiBaseUrl,
|
||||||
|
|||||||
Reference in New Issue
Block a user