mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 03:46:08 +00:00
fix: project can not be started
This commit is contained in:
parent
51e83c1476
commit
980d848196
23
.env.example
23
.env.example
@ -4,26 +4,29 @@ ADMINER_PORT=8080
|
||||
DB_MYSQL_PORT=3306
|
||||
DB_POSTGRES_PORT=5432
|
||||
VERDACCIO_PORT=4873
|
||||
APP_PORT=23001
|
||||
API_PORT=23002
|
||||
APP_PORT=13001
|
||||
API_PORT=13002
|
||||
|
||||
########## NOCOBASE ENV ##########
|
||||
|
||||
# DATABASE
|
||||
|
||||
DB_DIALECT=postgres
|
||||
DB_HOST=localhost
|
||||
DB_PORT=5432
|
||||
DB_DATABASE=nocobase
|
||||
DB_USER=nocobase
|
||||
DB_PASSWORD=nocobase
|
||||
DB_DIALECT=sqlite
|
||||
DB_STORAGE=db.sqlite
|
||||
|
||||
# DB_DIALECT=postgres
|
||||
# DB_HOST=localhost
|
||||
# DB_PORT=5432
|
||||
# DB_DATABASE=nocobase
|
||||
# DB_USER=nocobase
|
||||
# DB_PASSWORD=nocobase
|
||||
|
||||
# set to 'on' to enable log
|
||||
DB_LOG_SQL=
|
||||
|
||||
# API & APP
|
||||
|
||||
NOCOBASE_ENV=
|
||||
API_PORT=23000
|
||||
APP_USE_STATIC_SERVER=true
|
||||
APP_DIST=packages/app/dist
|
||||
|
||||
@ -39,7 +42,7 @@ STORAGE_TYPE=local
|
||||
|
||||
# LOCAL STORAGE
|
||||
LOCAL_STORAGE_USE_STATIC_SERVER=true
|
||||
LOCAL_STORAGE_BASE_URL=http://localhost:23000
|
||||
LOCAL_STORAGE_BASE_URL=http://localhost:13002
|
||||
|
||||
# ALI OSS STORAGE
|
||||
ALI_OSS_STORAGE_BASE_URL=
|
||||
|
13
.umirc.ts
13
.umirc.ts
@ -1,19 +1,20 @@
|
||||
import { defineConfig } from 'dumi';
|
||||
|
||||
console.log('process.env.API_URL', process.env.API_URL)
|
||||
const baseUrl = `http://localhost:${process.env.API_PORT || '13001'}/`;
|
||||
console.log('baseUrl', baseUrl);
|
||||
|
||||
export default defineConfig({
|
||||
title: ' ',
|
||||
hash: true,
|
||||
define: {
|
||||
'process.env.API_URL': process.env.API_URL,
|
||||
'process.env.API_URL': process.env.API_URL || `${baseUrl}api/`,
|
||||
'process.env.API_HOSTNAME': process.env.API_HOSTNAME,
|
||||
},
|
||||
proxy: {
|
||||
'/api/': {
|
||||
'target': `http://localhost:${process.env.API_PORT}/`,
|
||||
'changeOrigin': true,
|
||||
'pathRewrite': { '^/api/': '/api/' },
|
||||
target: baseUrl,
|
||||
changeOrigin: true,
|
||||
pathRewrite: { '^/api/': '/api/' },
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
@ -44,7 +45,7 @@ export default defineConfig({
|
||||
top: 150px !important;
|
||||
}
|
||||
}
|
||||
`
|
||||
`,
|
||||
],
|
||||
// mfsu: {},
|
||||
// ssr: {},
|
||||
|
@ -8,7 +8,7 @@
|
||||
"bootstrap": "lerna bootstrap",
|
||||
"clean": "lerna clean",
|
||||
"examples": "ts-node-dev -r dotenv/config ./examples",
|
||||
"start": "concurrently \"npm run start-server\" \"npm run start-client\"",
|
||||
"start": "concurrently \"npm run start-server\" \"npm run start-docs\"",
|
||||
"start-client": "cd packages/app && npm run start-client",
|
||||
"start-server": "ts-node-dev -r dotenv/config ./packages/app/src/apis/index.ts",
|
||||
"nocobase": "ts-node-dev -r dotenv/config ./packages/app/src/apis/index.ts",
|
||||
|
Loading…
Reference in New Issue
Block a user