Bun 博客实战(10):测试、构建与部署
bun:test + 临时 SQLite + typecheck,最后用 bun build --compile 打成单文件;只维护 VPS 一条部署路径。
Engineering notes and ranked practice on OpenWrt / Yocto / NVIDIA Tegra and edge AI gateways: understand by reading, grow through practice; traceable, reproducible, bounded.
Practice and exams · routing/bridging/debugging
138 questions cover ip addr / ip link / ip route / bridge, VLANs, policy routing, NAT, raw IP and iPerf3 throughput. Exams grade at the end; practice gives instant feedback.
This is not command memorization; it builds a troubleshooting order: link → bridge → rule → table → route → NAT → capture.
Draw 25 random questions from the 100 / 38 bank; 20 to pass. Submit at the end.
PracticeGrade immediately; previous, skip and jump to any question.
Attention, FFN, positional encoding, training and inference
OpenWrtUCI, netifd, ubus, fw4, ImageBuilder
OpenWrtUCI, netifd, bridge/VLAN, static routes, PPPoE
VLAN802.1Q, PVID, access/trunk, bridge vlan filtering
ACLgetfacl/setfacl, mask, default ACLs, inheritance and backup
prplOS / AMXData model, transactions, NetModel, USP
YoctoLayers, recipes, BitBake, images
PPPoEpppd, LCP, auth, DNS, teardown
iPerf3TCP/UDP, reverse, loss, trustworthy results
bun:test + 临时 SQLite + typecheck,最后用 bun build --compile 打成单文件;只维护 VPS 一条部署路径。
为什么所有 SQL 都收口到 db.ts:Bun.SQL、WAL、参数化查询、异步引擎,以及 savePost 如何把 Markdown 和标签一次写对。
不用 D1,也不假装异步:Bun.SQL 直接连 SQLite,保留 await 调用,同时把 schema 内嵌、参数绑定和单写者边界讲清楚。
从 package.json、tsconfig、bunfig 到 src/index.ts:这个博客为什么这样分层,静态资源、数据库和端口分别在哪里初始化。
不引 Markdown 库,自己写一个够用的渲染器:frontmatter、代码块、表格、列表、转义、目录锚点,以及 source_md 的往返。
不装 React,也能用 TSX 写服务端组件:jsxImportSource、自动转义、片段复用、连字符属性和 dangerouslySetInnerHTML 的边界。
Subscribe via RSS to get new posts automatically.
Technical questions, feedback and leads: use the guestbook.