diff --git a/.gitignore b/.gitignore index 2cfe279..3c0b2e4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ node_modules - +wwwroot bun.lockb bin @@ -10,4 +10,4 @@ obj /obj/ -.vs \ No newline at end of file +.vs diff --git a/Server/LocalServer/Program.cs b/Server/LocalServer/Program.cs index e7c007d..e0b2d86 100644 --- a/Server/LocalServer/Program.cs +++ b/Server/LocalServer/Program.cs @@ -36,6 +36,11 @@ if (app.Environment.IsDevelopment()) app.UseSwagger(); app.UseSwaggerUI(); } +DefaultFilesOptions defops = new DefaultFilesOptions(); +defops.DefaultFileNames.Clear(); +defops.DefaultFileNames.Add("index.html"); +app.UseDefaultFiles(defops); +app.UseStaticFiles(); app.UseWebSockets(); app.UseAuthorization(); app.Urls.Clear(); diff --git a/Tool/webtool/package.json b/Tool/webtool/package.json index 56c7a68..78e8d56 100644 --- a/Tool/webtool/package.json +++ b/Tool/webtool/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "dev": "vite", - "build": "vite build", + "build": "vite build --outDir ../../Server/LocalServer/wwwroot/", "preview": "vite preview" }, "dependencies": { diff --git a/Tool/webtool/src/connect.js b/Tool/webtool/src/connect.js index 33c5b96..a61d682 100644 --- a/Tool/webtool/src/connect.js +++ b/Tool/webtool/src/connect.js @@ -6,8 +6,8 @@ class ConnectPipe { // this.#websocket = new WebSocket(`ws://${window.location.host}`) } OpenPipe(config, MsgCb) { - // var webSocUrl = `ws://${window.location.host}:${window.location.port}/websoc?Name=${config.Name}` - var webSocUrl = "ws://127.0.0.1:6818/websoc?Name=Test"; + var webSocUrl = `ws://${window.location.host}/websoc?Name=${config.Name}` + // var webSocUrl = "ws://127.0.0.1:6818/websoc?Name=Test"; this.#websocket = new WebSocket(webSocUrl); this.#websocket.onopen = (event) => { var starter = { diff --git a/Tool/webtool/test.js b/Tool/webtool/test.js deleted file mode 100644 index 0ce362b..0000000 --- a/Tool/webtool/test.js +++ /dev/null @@ -1,38 +0,0 @@ -config = { - Name: "Test", - RemoteUrl: "D:/FileSyncTest/dtemp", - RemotePwd: "t123", - IsDeployDb: false, - IsDeployProject: false, - LocalProjectAbsolutePath: - "D:/git/HMES-H7-HNFY/HMES-H7-HNFYMF/HMES-H7-HNFYMF.WEB", - LocalRootPath: "D:/FileSyncTest/src", - - RemoteRootPath: "D:/FileSyncTest/dst", - SrcDb: { - ServerName: "172.16.12.2", - DatebaseName: "HMES_H7_HNFYMF", - User: "hmes-h7", - Password: "Hmes-h7666", - TrustServerCertificate: "True", - SyncTablesData: [ - "dbo.sys_Button", - "dbo.sys_Menu", - "dbo.sys_Module", - "dbo.sys_Page", - ], - }, - DstDb: { - ServerName: "127.0.0.1", - DatebaseName: "HMES_H7_HNFYMF", - User: "sa", - Password: "0", - TrustServerCertificate: "True", - }, - DirFileConfigs: [ - { - DirPath: "/bin", - Excludes: ["/roslyn", "/Views"], - }, - ], -};