如题:哪位用aardio写做网站后台!能给个DEMO参考一下。多页面管理。登陆权限这块。
是这样的示例么?
import win.ui; import console; import web.socket.server; /*DSG{{*/ var mfkform = win.form(text="学习socket-server ";right=282;bottom=179) mfkform.add() /*}}*/ console.open(); var wsServer = web.socket.server(); //运行HTTP服务端 wsServer.httpServer.documentBase = "\res\editor\"; wsServer.httpServer.defalutDocument = "index.html"; wsServer.onUpgradeToWebsocket = function(hSocket, request, response, protocol, origin) { if (request.path != "/") { return response.errorStatus(); // 拒绝其他路径 } } // 启动 WebSocket 服务器 (端口 ) if (!wsServer.start(, 8081)) { console.log("服务启动失败,请检查端口"); } else { console.log("已启动 服务"); console.log("支持局域网浏览器HTML页面进行控制"); } // ==== 程序主循环 === ..mfkform = mfkform; mfkform.show(); win.loopMessage();
访问站点根目录在aardio v42.23.1 之前是正常的,新升级aardio最新版本后,在启动httpServer.documentBase时路径好像是失败的。提示404.