diff --git a/LICENSE b/LICENSE deleted file mode 100644 index ceb73cc..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 d3george - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/src/main.tsx b/src/main.tsx index 897b089..c214e05 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -11,7 +11,6 @@ import 'virtual:svg-icons-register'; import App from '@/App'; -import { worker } from './_mock'; // i18n import './locales/i18n'; // tailwind css @@ -54,5 +53,5 @@ root.render( , ); -// 🥵 start service worker mock in development mode -worker.start({ onUnhandledRequest: 'bypass' }); +// 不再使用 mock 数据,调用 nest 后端获取 +// worker.start({ onUnhandledRequest: 'bypass' }); diff --git a/vite.config.ts b/vite.config.ts index 35e0a71..51ac2ec 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -31,13 +31,11 @@ export default defineConfig({ }), ], server: { - // 自动打开浏览器 - open: true, host: true, - port: 3001, + port: 7442, proxy: { '/api': { - target: 'http://localhost:3000', + target: 'http://127.0.0.1:7441', changeOrigin: true, rewrite: (path) => path.replace(/^\/api/, ''), },