feat: add baseURL dev and sequelize error

This commit is contained in:
2024-10-19 17:32:02 +08:00
parent 5c3f454d8c
commit 644539b624
10 changed files with 70 additions and 12 deletions

View File

@@ -2,7 +2,12 @@ import { Query } from '@kevisual/query';
import { getConfig } from './get-config.ts';
const config = getConfig();
export const baseURL = config?.baseURL || 'https://envision.xiongxiao.me';
export const getBaseURL = () => {
if (config?.dev) {
return 'http://localhost:4002';
}
return baseURL;
};
export const query = new Query({
url: `${baseURL}/api/router`,
});