mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 11:43:22 +02:00
Cleaning here and there
This commit is contained in:
@@ -22,14 +22,17 @@ TODO
|
|||||||
|
|
||||||
### Environment variables
|
### Environment variables
|
||||||
|
|
||||||
- ./env
|
- ./env:
|
||||||
- APP_API_ADDRESS: `http://example.com`
|
|
||||||
- APP_FRONT_ADDRESS: `http://example.com`
|
```
|
||||||
- APP_BASE_API_PATH: `/example`
|
APP_API_ADDRESS=http://example.com
|
||||||
- APP_BASE_FRONT_PATH: `/example`
|
APP_FRONT_ADDRESS=http://example.com
|
||||||
- APP_API_PORT: `1234`
|
APP_BASE_API_PATH=/example
|
||||||
- APP_FRONT_PORT: `1234`
|
APP_BASE_FRONT_PATH=/example
|
||||||
- APP_JWT_SECRET: `secret`
|
APP_API_PORT=1234
|
||||||
|
APP_FRONT_PORT=1234
|
||||||
|
APP_JWT_SECRET=secret
|
||||||
|
```
|
||||||
|
|
||||||
## API Usage
|
## API Usage
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { fileURLToPath, URL } from "node:url"
|
import { fileURLToPath, URL } from "node:url"
|
||||||
import { defineConfig, loadEnv } from "vite"
|
import { defineConfig, loadEnv, type UserConfig } from "vite"
|
||||||
import vue from "@vitejs/plugin-vue"
|
import vue from "@vitejs/plugin-vue"
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig(({ command, mode }) => {
|
export default defineConfig(({ command, mode }): UserConfig => {
|
||||||
const env1 = loadEnv(mode, "./../../", "")
|
const env1 = loadEnv(mode, "./../../", "")
|
||||||
const env2 = loadEnv(mode, process.cwd(), "")
|
const env2 = loadEnv(mode, process.cwd(), "")
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ export default defineConfig(({ command, mode }) => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
server: {
|
server: {
|
||||||
port: env1.APP_FRONT_PORT,
|
port: parseInt(env1.APP_FRONT_PORT),
|
||||||
},
|
},
|
||||||
base: env1.APP_BASE_FRONT_PATH ?? "/"
|
base: env1.APP_BASE_FRONT_PATH ?? "/"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user