This commit is contained in:
2023-05-15 10:39:43 +07:00
parent 3ee8d6d0be
commit 1d2ca485cc
3 changed files with 10 additions and 9 deletions

View File

@@ -17,8 +17,6 @@ export const getConnectNode = (node_id: string) => {
return `https://${node_id}.chatngay.com:8080/chat`
};
export const SOCKET_OPTIONS = {
}
export const SOCKET_OPTIONS = {}
export const CREDENTIAL_SAVE_KEY = 'chatngay-u';

View File

@@ -4,12 +4,13 @@ import { Provider} from 'react-redux';
import App from './App';
import reportWebVitals from './reportWebVitals';
import store from "./store";
import {runTest} from "./test";
//import {runTest} from "./test";
// local
import {getSettings, setUp} from "@/setup";
import Error from '@/components/Error';
import {isBrowserSupport} from "@/lib/utils";
import {ClientSettings} from "@/typings";
// style
//import './index.css';
@@ -26,11 +27,13 @@ import {isBrowserSupport} from "@/lib/utils";
return;
}
const client_setting = await getSettings();
/*const client_setting = await getSettings();
if (! client_setting ) {
ReactDOM.render(<Error message={'Can not get setting'}/>, render_root);
return;
}
}*/
const client_setting: ClientSettings = {staff: []}
await setUp();
@@ -42,7 +45,7 @@ import {isBrowserSupport} from "@/lib/utils";
ReactDOM.render(<Root />, render_root);
runTest();
//runTest();
})();

View File

@@ -5,8 +5,8 @@ const createProxyMiddleware = require('http-proxy-middleware');
// proxy middleware options
// see: https://www.npmjs.com/package/http-proxy-middleware#http-proxy-options
const options = {
// target: 'https://api195.chatngay.com/admin/', // target host
target: 'http://local.chatngay.api/admin/', //https://api195.chatngay.com/admin/', // target host
target: 'https://api2.chatngay.com/admin/', // target host
//target: 'http://local.chatngay.api/admin/', //https://api2.chatngay.com/admin/', // target host
changeOrigin: true, // needed for virtual hosted sites
//ws: true, // proxy websockets
pathRewrite: {