feat: LocalServer 静态页面添加!

This commit is contained in:
zerlei 2024-10-12 21:38:08 +08:00
parent ca6795d31f
commit 84ba994048
5 changed files with 10 additions and 43 deletions

4
.gitignore vendored
View file

@ -1,5 +1,5 @@
node_modules
wwwroot
bun.lockb
bin
@ -10,4 +10,4 @@ obj
/obj/
.vs
.vs

View file

@ -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();

View file

@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"build": "vite build --outDir ../../Server/LocalServer/wwwroot/",
"preview": "vite preview"
},
"dependencies": {

View file

@ -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 = {

View file

@ -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"],
},
],
};