import win.ui; /*DSG{{*/ var winform = win.form(text="aardio form";right=759;bottom=469) winform.add() /*}}*/ import console; import process; import wsock.tcp.simpleHttpServer; var server = wsock.tcp.simpleHttpServer()//"127.0.0.1",/*8081*/); console.log( server.getUrl() ) process.execute( server.getUrl() ); //如果不需要窗口界面,那也可以直接使用 wsock.tcp.simpleHttpServer server.run( function(response,request,session){ if( io.exist( request.path,0) && request.path!="/main.aardio" ){ response.loadcode( request.path ) } else{ loadcodex(` `) } } ) import win.timer var timer = win.timer( winform ); timer.onTimer = function(hwnd,msg,id,tick){ server.publish("reload",) } //timer.setInterval(100) timer.enable(100,100) winform.show(); win.loopMessage();