更新微信小游戏版:动画教学、分段高亮指路及发布包

This commit is contained in:
toshiocn
2026-10-20 18:05:48 +08:00
parent fdca4f67ea
commit 2d5a9e9553
75 changed files with 40842 additions and 2 deletions
+10
View File
@@ -0,0 +1,10 @@
import http from 'node:http';
import fs from 'node:fs';
import path from 'node:path';
import {fileURLToPath} from 'node:url';
const root=path.resolve(path.dirname(fileURLToPath(import.meta.url)),'..');
http.createServer((req,res)=>{
const file=path.resolve(root,'.'+decodeURIComponent(new URL(req.url,'http://localhost').pathname));
if(!file.startsWith(root+path.sep)){res.writeHead(403).end();return;}
try{res.setHeader('Content-Type',file.endsWith('.html')?'text/html; charset=utf-8':file.endsWith('.json')?'application/json':'text/javascript; charset=utf-8');res.end(fs.readFileSync(file));}catch{res.writeHead(404).end();}
}).listen(17859,'127.0.0.1',()=>console.log('Canvas QA: http://127.0.0.1:17859/qa/hints.html'));