Quizzes

Bun blog practice test

Ranked exam: Bronze 10 (8 to pass), Silver 10 (8), Gold 10 (8). Questions follow the Bun, Hono, SQLite, htmx and deployment stack used by this blog.

Bronze to Gold · 60 questions · Exam mode

1ConceptWhich roles does Bun play in this blog?
2CommandWhat does `bun --hot src/index.ts` mainly do?
3ConceptHow does the blog read PORT and BLOG_DB_FILE?
4ConceptWhat does Bun.SQL add over using bun:sqlite directly?
5CommandWhich command produces a single-file Linux executable?
6ConceptWhat storage does the blog use in the end?
7ConfigWhich package.json field makes the project use ESM?
8CommandWhat does `bun run build` actually do here?
9ConfigWhich tsconfig option makes .tsx use Hono JSX instead of React?
10ConfigWhat is BLOG_ROOT for when deploying the compiled binary?
11ConfigWhy do tests set BLOG_DB_FILE?
12ConceptWhy does src/index.ts await initLocalDb() before Bun.serve?
13ConceptWhy can Bun.serve use fetch: app.fetch?
14ConceptWhy mount the English routes again under /en?
15ConceptWhy is pageRoutes mounted after /posts, /tags, /series and /quiz?
16ConceptWhich request should trackViews not record?
17ConfigWhat happens when /Sitemap.xml is requested?
18ConceptWho serves the blog static assets?
19ConfigDo the blog .tsx files import React?
20ConceptWhat happens to < and & in <h1>{post.title}</h1>?
21ConceptWhere is dangerouslySetInnerHTML allowed in this project?
22ConceptWhat can wrap multiple sibling nodes in a component?
23ConfigHow do you pass hx-get in JSX?
24ConceptWhat does renderHtml(c, opts) centralize?
25ConceptHow does the server detect an htmx request?
26ConfigWhat does hx-swap="outerHTML" replace?
27ConceptHow do normal forms and htmx avoid duplicate comment submissions?
28ConceptWhy do pagination buttons keep href?
29ConfigCan hx-confirm replace server-side authorization?
30ConceptWhere does the blog load htmx from?
31ConfigWhat is the main benefit of journal_mode=WAL?
32ConceptWhy does db.ts use ? placeholders for all values?
33ConceptWhat is the single allowed DB entry point?
34ConceptWhy does the Engine interface stay async?
35ConfigWhat change is ensureColumn best for?
36ConceptWhich of these does savePost not do?
37ConceptWhich three methods does Engine expose?
38ConceptWhich function ensures Engine is initialized before queries?
39ConfigWhich URL does Bun.SQL use for a local SQLite file?
40ConfigWhat does schema:gen do?
41ConceptWhy is SCHEMA_SQL split into statements?
42ConceptAfter opening Bun.SQL, what does initLocalDb do first?
43ConceptWhat does the blog frontmatter parser support?
44ConceptWhich code fences does md.ts support?
45ConceptWhy does the Markdown renderer escape HTML before generating tags?
46ConceptWhat is source_md mainly for?
47ConceptWhen is Markdown rendered into HTML?
48ConceptWhich headings does withToc handle?
49ConceptWhy does the blog use WebCrypto PBKDF2 for passwords?
50ConfigWhat is the stored password hash format?
51ConceptWhy accumulate byte XOR instead of using ===?
52ConceptWhat does the session cookie actually contain?
53ConfigWhat are the key session cookie attributes?
54ConceptHow does adminOnly handle anonymous and non-admin users?
55ConfigWhat timing matters when tests set BLOG_DB_FILE?
56ConceptWhat is the more reliable way to seed DB tests?
57ConceptWhy is a passing typecheck not enough?
58ConfigWhat must exist under BLOG_ROOT for the compiled binary?
59ConceptHow does the binary create tables without db/schema.sql?
60ConceptWhat must be guaranteed when deploying the compiled binary?
Back