mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-12-01 19:58:15 +08:00
chore: adjust parameters
This commit is contained in:
parent
6c76d27cd3
commit
b95e2da129
@ -14,7 +14,7 @@ DB_LOG_SQL=
|
||||
DB_MYSQL_PORT=3306
|
||||
DB_POSTGRES_PORT=5432
|
||||
|
||||
HTTP_PORT=23000
|
||||
API_PORT=23000
|
||||
|
||||
VERDACCIO_PORT=4873
|
||||
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,6 +5,7 @@ lib/
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
!/yarn.lock
|
||||
!/package-lock.json
|
||||
yarn-error.log
|
||||
lerna-debug.log
|
||||
packages/database/package-lock.json
|
||||
|
19912
package-lock.json
generated
Normal file
19912
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,7 @@ DB_PASSWORD=test
|
||||
DB_MYSQL_PORT=3306
|
||||
DB_POSTGRES_PORT=5432
|
||||
|
||||
HTTP_PORT=23000
|
||||
API_PORT=23000
|
||||
|
||||
VERDACCIO_PORT=4873
|
||||
|
||||
|
@ -7,11 +7,11 @@ export default defineConfig({
|
||||
},
|
||||
define: {
|
||||
'process.env.API': `/api`,
|
||||
// 'process.env.API': `http://localhost:${process.env.HTTP_PORT}/api`,
|
||||
// 'process.env.API': `http://localhost:${process.env.API_PORT}/api`,
|
||||
},
|
||||
proxy: {
|
||||
'/api': {
|
||||
'target': `http://localhost:${process.env.HTTP_PORT}/`,
|
||||
'target': `http://localhost:${process.env.API_PORT}/`,
|
||||
'changeOrigin': true,
|
||||
'pathRewrite': { '^/api' : '/api' },
|
||||
},
|
||||
|
@ -81,7 +81,7 @@ api.resourcer.use(async (ctx: actions.Context, next) => {
|
||||
name: 'users',
|
||||
}});
|
||||
await api.database.getModel('automations').load();
|
||||
api.listen(process.env.HTTP_PORT, () => {
|
||||
console.log(`http://localhost:${process.env.HTTP_PORT}/`);
|
||||
api.listen(process.env.API_PORT, () => {
|
||||
console.log(`http://localhost:${process.env.API_PORT}/`);
|
||||
});
|
||||
})();
|
||||
|
@ -1,4 +1,4 @@
|
||||
HTTP_PORT=23000
|
||||
API_PORT=23000
|
||||
|
||||
DB_DATABASE=test
|
||||
DB_USER=test
|
||||
|
@ -4,7 +4,7 @@ import qs from 'qs';
|
||||
import { FILE_FIELD_NAME, STORAGE_TYPE_LOCAL } from '../constants';
|
||||
import { getApp, getAgent, getAPI } from '.';
|
||||
|
||||
const DEFAULT_LOCAL_BASE_URL = process.env.LOCAL_STORAGE_BASE_URL || `http://localhost:${process.env.HTTP_PORT}/uploads`;
|
||||
const DEFAULT_LOCAL_BASE_URL = process.env.LOCAL_STORAGE_BASE_URL || `http://localhost:${process.env.API_PORT}/uploads`;
|
||||
|
||||
describe('action', () => {
|
||||
let app;
|
||||
|
@ -45,7 +45,7 @@ export function middleware(app) {
|
||||
url = {
|
||||
protocol: 'http:',
|
||||
hostname: 'localhost',
|
||||
port: process.env.HTTP_PORT,
|
||||
port: process.env.API_PORT,
|
||||
pathname: baseUrl
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user