{"id":258,"date":"2026-09-18T10:09:24","date_gmt":"2026-09-18T02:09:24","guid":{"rendered":"https:\/\/yykcj.com\/?p=258"},"modified":"2026-09-18T10:09:24","modified_gmt":"2026-09-18T02:09:24","slug":"bun-%e8%bf%90%e8%a1%8c%e6%97%b6%e5%85%a5%e9%97%a8%e4%b8%8e%e7%94%9f%e6%80%81%e6%a6%82%e8%a7%88%ef%bc%9a%e4%bb%8e%e9%9b%b6%e5%88%b0%e4%b8%80%e6%9e%84%e5%bb%ba%e9%ab%98%e6%80%a7%e8%83%bd%e5%ba%94","status":"publish","type":"post","link":"https:\/\/yykcj.com\/?p=258","title":{"rendered":"Bun \u8fd0\u884c\u65f6\u5165\u95e8\u4e0e\u751f\u6001\u6982\u89c8\uff1a\u4ece\u96f6\u5230\u4e00\u6784\u5efa\u9ad8\u6027\u80fd\u5e94\u7528"},"content":{"rendered":"<h2>\u4e3a\u4ec0\u4e48\u9700\u8981\u5173\u6ce8 Bun\uff1f<\/h2>\n<p>\u5982\u679c\u4f60\u662f\u4e00\u540d JavaScript\/TypeScript \u5f00\u53d1\u8005\uff0c\u53ef\u80fd\u5df2\u7ecf\u5bf9 Node.js \u548c Deno \u975e\u5e38\u719f\u6089\u3002\u4f46\u6700\u8fd1\u4e24\u5e74\uff0c\u4e00\u4e2a\u540d\u4e3a <strong>Bun<\/strong> \u7684\u8fd0\u884c\u65f6\u6b63\u5728\u5feb\u901f\u5d1b\u8d77\u3002\u5b83\u7531 Jarred Sumner \u521b\u5efa\uff0c\u76ee\u6807\u662f\u63d0\u4f9b\u4e00\u4e2a<strong>\u66f4\u5feb\u3001\u66f4\u7b80\u6d01\u3001\u66f4\u96c6\u6210<\/strong>\u7684 JavaScript \u5de5\u5177\u94fe\u3002<\/p>\n<p>Bun \u4e0d\u4ec5\u662f\u4e00\u4e2a\u8fd0\u884c\u65f6\uff0c\u8fd8\u5185\u7f6e\u4e86\u5305\u7ba1\u7406\u5668\u3001\u6253\u5305\u5668\u3001\u6d4b\u8bd5\u8fd0\u884c\u5668\uff0c\u751a\u81f3\u652f\u6301 TypeScript \u548c JSX \u5f00\u7bb1\u5373\u7528\u3002\u6839\u636e\u5b98\u65b9\u57fa\u51c6\u6d4b\u8bd5\uff0cBun \u7684\u542f\u52a8\u901f\u5ea6\u548c HTTP \u541e\u5410\u91cf\u90fd\u663e\u8457\u4f18\u4e8e Node.js\u3002<\/p>\n<p>\u8fd9\u7bc7\u6587\u7ae0\u5c06\u5e26\u4f60\u4ece\u96f6\u5f00\u59cb\uff0c\u9010\u6b65\u4e86\u89e3 Bun \u7684\u6838\u5fc3\u529f\u80fd\uff0c\u5e76\u901a\u8fc7\u4e00\u4e2a\u5b8c\u6574\u7684 REST API \u793a\u4f8b\uff0c\u5c55\u793a\u5982\u4f55\u5728\u5b9e\u9645\u9879\u76ee\u4e2d\u5e94\u7528\u5b83\u3002\u6211\u4eec\u8fd8\u4f1a\u63a2\u8ba8 Bun \u7684\u751f\u6001\u73b0\u72b6\u3001\u6700\u4f73\u5b9e\u8df5\u4ee5\u53ca\u4e00\u4e9b\u5e38\u89c1\u7684\u5751\u3002<\/p>\n<p>&#8212;<\/p>\n<h2>1. \u5b89\u88c5 Bun<\/h2>\n<p>Bun \u652f\u6301 macOS\u3001Linux \u548c Windows\uff08WSL\uff09\u3002\u5b89\u88c5\u975e\u5e38\u7b80\u5355\uff0c\u4e00\u884c\u547d\u4ee4\u5373\u53ef\uff1a<\/p>\n<pre><code class=\"language-bash\">\n# macOS \/ Linux\ncurl -fsSL https:\/\/bun.sh\/install | bash\n\n# Windows (\u4f7f\u7528 PowerShell)\nirm bun.sh\/install.ps1 | iex\n<\/code><\/pre>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u9a8c\u8bc1\u7248\u672c\uff1a<\/p>\n<pre><code class=\"language-bash\">\nbun --version\n# \u8f93\u51fa\u793a\u4f8b\uff1a1.1.34\n<\/code><\/pre>\n<p>\ud83d\udca1 <strong>\u6ce8\u610f<\/strong>\uff1aBun \u7684\u7248\u672c\u8fed\u4ee3\u975e\u5e38\u5feb\uff0c\u5efa\u8bae\u5b9a\u671f\u4f7f\u7528 <code>bun upgrade<\/code> \u66f4\u65b0\u5230\u6700\u65b0\u7248\u3002<\/p>\n<p>&#8212;<\/p>\n<h2>2. \u7b2c\u4e00\u4e2a Bun \u7a0b\u5e8f<\/h2>\n<p>\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684 <code>hello.ts<\/code> \u6587\u4ef6\uff1a<\/p>\n<pre><code class=\"language-typescript\">\nconst message: string = &quot;Hello, Bun!&quot;;\nconsole.log(message);\n<\/code><\/pre>\n<p>\u76f4\u63a5\u8fd0\u884c\uff1a<\/p>\n<pre><code class=\"language-bash\">\nbun run hello.ts\n<\/code><\/pre>\n<p>\u4f60\u4f1a\u53d1\u73b0 Bun \u76f4\u63a5\u6267\u884c\u4e86 TypeScript \u6587\u4ef6\uff0c\u65e0\u9700\u4efb\u4f55\u7f16\u8bd1\u6b65\u9aa4\u3002\u8fd9\u662f Bun \u7684\u4e00\u5927\u4eae\u70b9\uff1a<strong>\u539f\u751f\u652f\u6301 TypeScript \u548c JSX<\/strong>\u3002<\/p>\n<p>&#8212;<\/p>\n<h2>3. \u4f7f\u7528 Bun \u4f5c\u4e3a\u5305\u7ba1\u7406\u5668<\/h2>\n<p>Bun \u5185\u7f6e\u4e86\u5305\u7ba1\u7406\u5668\uff0c\u517c\u5bb9 npm \u751f\u6001\uff0c\u4f46\u901f\u5ea6\u66f4\u5feb\u3002\u521d\u59cb\u5316\u9879\u76ee\uff1a<\/p>\n<pre><code class=\"language-bash\">\nmkdir bun-demo &amp;&amp; cd bun-demo\nbun init -y\n<\/code><\/pre>\n<p>\u8fd9\u4f1a\u751f\u6210 <code>package.json<\/code>\u3001<code>tsconfig.json<\/code> \u7b49\u6587\u4ef6\u3002\u5b89\u88c5\u4f9d\u8d56\uff1a<\/p>\n<pre><code class=\"language-bash\">\nbun add express\nbun add -d @types\/express\n<\/code><\/pre>\n<p>Bun \u4f1a\u751f\u6210 <code>bun.lockb<\/code> \u4e8c\u8fdb\u5236\u9501\u6587\u4ef6\uff0c\u6bd4 <code>package-lock.json<\/code> \u66f4\u7d27\u51d1\u3002<\/p>\n<p>\ud83d\udca1 <strong>\u6700\u4f73\u5b9e\u8df5<\/strong>\uff1a\u5728 CI \u73af\u5883\u4e2d\u4f7f\u7528 <code>bun install --frozen-lockfile<\/code> \u786e\u4fdd\u4f9d\u8d56\u4e00\u81f4\u6027\u3002<\/p>\n<p>&#8212;<\/p>\n<h2>4. \u6784\u5efa\u4e00\u4e2a REST API<\/h2>\n<p>\u8ba9\u6211\u4eec\u7528 Bun \u539f\u751f HTTP \u670d\u52a1\u5668\uff08<code>Bun.serve<\/code>\uff09\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684\u7528\u6237\u7ba1\u7406 API\u3002<\/p>\n<p>\u521b\u5efa <code>server.ts<\/code>\uff1a<\/p>\n<pre><code class=\"language-typescript\">\ninterface User {\n  id: number;\n  name: string;\n  email: string;\n}\n\nconst users: User[] = [\n  { id: 1, name: &quot;Alice&quot;, email: &quot;alice@example.com&quot; },\n  { id: 2, name: &quot;Bob&quot;, email: &quot;bob@example.com&quot; },\n];\n\nconst server = Bun.serve({\n  port: 3000,\n  async fetch(req) {\n    const url = new URL(req.url);\n\n    \/\/ GET \/users\n    if (req.method === &quot;GET&quot; &amp;&amp; url.pathname === &quot;\/users&quot;) {\n      return Response.json(users);\n    }\n\n    \/\/ GET \/users\/:id\n    const match = url.pathname.match(\/^\\\/users\\\/(\\d+)$\/);\n    if (req.method === &quot;GET&quot; &amp;&amp; match) {\n      const id = parseInt(match[1]);\n      const user = users.find((u) =&gt; u.id === id);\n      if (!user) {\n        return new Response(&quot;User not found&quot;, { status: 404 });\n      }\n      return Response.json(user);\n    }\n\n    \/\/ POST \/users\n    if (req.method === &quot;POST&quot; &amp;&amp; url.pathname === &quot;\/users&quot;) {\n      const body = await req.json();\n      const newUser: User = {\n        id: users.length + 1,\n        name: body.name,\n        email: body.email,\n      };\n      users.push(newUser);\n      return Response.json(newUser, { status: 201 });\n    }\n\n    return new Response(&quot;Not Found&quot;, { status: 404 });\n  },\n});\n\nconsole.log(`Server running at http:\/\/localhost:${server.port}`);\n<\/code><\/pre>\n<p>\u8fd0\u884c\uff1a<\/p>\n<pre><code class=\"language-bash\">\nbun run server.ts\n<\/code><\/pre>\n<p>\u6d4b\u8bd5 API\uff1a<\/p>\n<pre><code class=\"language-bash\">\ncurl http:\/\/localhost:3000\/users\ncurl http:\/\/localhost:3000\/users\/1\ncurl -X POST http:\/\/localhost:3000\/users -H &quot;Content-Type: application\/json&quot; -d &#x27;{&quot;name&quot;:&quot;Charlie&quot;,&quot;email&quot;:&quot;charlie@example.com&quot;}&#x27;\n<\/code><\/pre>\n<p>\u4f60\u4f1a\u53d1\u73b0 <code>Bun.serve<\/code> \u7684 API \u975e\u5e38\u7b80\u6d01\uff0c\u4e14\u6027\u80fd\u51fa\u8272\u3002\u6839\u636e\u5b98\u65b9\u57fa\u51c6\uff0c\u5b83\u6bd4 Node.js \u7684 HTTP \u6a21\u5757\u5feb\u6570\u500d\u3002<\/p>\n<p>&#8212;<\/p>\n<h2>5. \u4f7f\u7528 Bun \u6d4b\u8bd5<\/h2>\n<p>Bun \u5185\u7f6e\u4e86\u6d4b\u8bd5\u8fd0\u884c\u5668\uff0c\u8bed\u6cd5\u7c7b\u4f3c Jest\uff0c\u4f46\u901f\u5ea6\u66f4\u5feb\u3002\u521b\u5efa <code>server.test.ts<\/code>\uff1a<\/p>\n<pre><code class=\"language-typescript\">\nimport { describe, expect, test, beforeAll, afterAll } from &quot;bun:test&quot;;\n\nlet server: any;\n\nbeforeAll(() =&gt; {\n  \/\/ \u542f\u52a8\u6d4b\u8bd5\u670d\u52a1\u5668\n  server = Bun.serve({\n    port: 3001,\n    fetch: (req) =&gt; {\n      if (new URL(req.url).pathname === &quot;\/users&quot;) {\n        return Response.json([{ id: 1, name: &quot;Alice&quot; }]);\n      }\n      return new Response(&quot;Not Found&quot;, { status: 404 });\n    },\n  });\n});\n\nafterAll(() =&gt; {\n  server.stop();\n});\n\ndescribe(&quot;User API&quot;, () =&gt; {\n  test(&quot;GET \/users returns list&quot;, async () =&gt; {\n    const res = await fetch(&quot;http:\/\/localhost:3001\/users&quot;);\n    const data = await res.json();\n    expect(res.status).toBe(200);\n    expect(data).toHaveLength(1);\n    expect(data[0].name).toBe(&quot;Alice&quot;);\n  });\n\n  test(&quot;unknown route returns 404&quot;, async () =&gt; {\n    const res = await fetch(&quot;http:\/\/localhost:3001\/unknown&quot;);\n    expect(res.status).toBe(404);\n  });\n});\n<\/code><\/pre>\n<p>\u8fd0\u884c\u6d4b\u8bd5\uff1a<\/p>\n<pre><code class=\"language-bash\">\nbun test\n<\/code><\/pre>\n<p>Bun \u7684\u6d4b\u8bd5\u8fd0\u884c\u5668\u652f\u6301 TypeScript\u3001JSX\u3001\u6a21\u62df\uff08mock\uff09\u7b49\uff0c\u4e14\u65e0\u9700\u989d\u5916\u914d\u7f6e\u3002<\/p>\n<p>&#8212;<\/p>\n<h2>6. \u6253\u5305\u4e0e\u6784\u5efa<\/h2>\n<p>Bun \u4e5f\u53ef\u4ee5\u4f5c\u4e3a\u6253\u5305\u5668\u4f7f\u7528\u3002\u4f8b\u5982\uff0c\u5c06 <code>server.ts<\/code> \u6253\u5305\u6210\u5355\u4e2a\u6587\u4ef6\uff1a<\/p>\n<pre><code class=\"language-bash\">\nbun build .\/server.ts --outdir .\/dist --target bun\n<\/code><\/pre>\n<p>\u5bf9\u4e8e\u524d\u7aef\u9879\u76ee\uff0c\u53ef\u4ee5\u6307\u5b9a <code>--target browser<\/code>\uff1a<\/p>\n<pre><code class=\"language-bash\">\nbun build .\/src\/index.tsx --outdir .\/dist --target browser --minify\n<\/code><\/pre>\n<p>Bun \u7684\u6253\u5305\u5668\u901f\u5ea6\u6781\u5feb\uff0c\u4e14\u652f\u6301\u4ee3\u7801\u5206\u5272\u3001Tree Shaking \u7b49\u7279\u6027\u3002<\/p>\n<p>&#8212;<\/p>\n<h2>7. \u751f\u6001\u6982\u89c8\u4e0e\u517c\u5bb9\u6027<\/h2>\n<p>Bun \u7684\u76ee\u6807\u662f\u517c\u5bb9 Node.js \u751f\u6001\u3002\u76ee\u524d\uff0c\u5927\u90e8\u5206 npm \u5305\u90fd\u53ef\u4ee5\u76f4\u63a5\u5728 Bun \u4e2d\u8fd0\u884c\u3002\u4f46\u4ecd\u6709\u5c11\u6570\u5305\u4f9d\u8d56 Node.js \u5185\u90e8\u6a21\u5757\u6216\u539f\u751f\u63d2\u4ef6\uff0c\u53ef\u80fd\u65e0\u6cd5\u5de5\u4f5c\u3002<\/p>\n<p><strong>\u517c\u5bb9\u6027\u73b0\u72b6<\/strong>\uff1a<\/p>\n<ul>\n<li>\u6838\u5fc3 Node.js \u6a21\u5757\uff08<code>fs<\/code>\u3001<code>path<\/code>\u3001<code>http<\/code> \u7b49\uff09\u5df2\u5b9e\u73b0\u3002<\/li>\n<li><code>node-gyp<\/code> \u539f\u751f\u6a21\u5757\u652f\u6301\u6b63\u5728\u5b8c\u5584\u4e2d\u3002<\/li>\n<li>\u8bb8\u591a\u6d41\u884c\u6846\u67b6\uff08Express\u3001Hono\u3001Elysia\uff09\u5df2\u9002\u914d Bun\u3002<\/li>\n<\/ul>\n<p><strong>Bun \u4e13\u5c5e\u751f\u6001<\/strong>\uff1a<\/p>\n<ul>\n<li><strong>Elysia<\/strong>\uff1a\u4e00\u4e2a\u4e3a Bun \u8bbe\u8ba1\u7684\u5feb\u901f Web \u6846\u67b6\u3002<\/li>\n<li><strong>Bun SQLite<\/strong>\uff1a\u5185\u7f6e SQLite \u9a71\u52a8\uff0c\u65e0\u9700\u5b89\u88c5\u3002<\/li>\n<li><strong>Bun FFI<\/strong>\uff1a\u76f4\u63a5\u8c03\u7528 C \u51fd\u6570\u3002<\/li>\n<\/ul>\n<p>\ud83d\udca1 <strong>\u5efa\u8bae<\/strong>\uff1a\u5728\u65b0\u9879\u76ee\u4e2d\u53ef\u4ee5\u5927\u80c6\u5c1d\u8bd5 Bun\uff1b\u5bf9\u4e8e\u73b0\u6709\u5927\u578b\u9879\u76ee\uff0c\u5efa\u8bae\u5148\u8fdb\u884c\u517c\u5bb9\u6027\u6d4b\u8bd5\u3002<\/p>\n<p>&#8212;<\/p>\n<h2>8. \u5e38\u89c1\u5751\u4e0e\u6700\u4f73\u5b9e\u8df5<\/h2>\n<h3>\u5751 1\uff1a\u73af\u5883\u53d8\u91cf\u52a0\u8f7d<\/h3>\n<p>Bun \u4f1a\u81ea\u52a8\u52a0\u8f7d <code>.env<\/code> \u6587\u4ef6\uff0c\u4f46\u4e0d\u4f1a\u8986\u76d6\u5df2\u5b58\u5728\u7684\u73af\u5883\u53d8\u91cf\u3002\u5982\u679c\u9700\u8981\u5f3a\u5236\u8986\u76d6\uff0c\u4f7f\u7528 <code>--env-file<\/code> \u6216\u624b\u52a8\u5904\u7406\u3002<\/p>\n<h3>\u5751 2\uff1aTypeScript \u914d\u7f6e<\/h3>\n<p>Bun \u4f7f\u7528\u81ea\u5df1\u7684 TypeScript \u8f6c\u8bd1\u5668\uff0c\u67d0\u4e9b <code>tsconfig.json<\/code> \u9009\u9879\u53ef\u80fd\u4e0d\u88ab\u652f\u6301\u3002\u5efa\u8bae\u53c2\u8003\u5b98\u65b9\u63a8\u8350\u7684\u914d\u7f6e\uff1a<\/p>\n<pre><code class=\"language-json\">\n{\n  &quot;compilerOptions&quot;: {\n    &quot;target&quot;: &quot;ESNext&quot;,\n    &quot;module&quot;: &quot;ESNext&quot;,\n    &quot;moduleResolution&quot;: &quot;bundler&quot;,\n    &quot;types&quot;: [&quot;bun-types&quot;],\n    &quot;strict&quot;: true,\n    &quot;skipLibCheck&quot;: true\n  }\n}\n<\/code><\/pre>\n<h3>\u5751 3\uff1a\u4e0e Node.js \u7684\u5dee\u5f02<\/h3>\n<ul>\n<li><code>Bun.serve<\/code> \u7684 <code>fetch<\/code> \u51fd\u6570\u8fd4\u56de <code>Response<\/code> \u5bf9\u8c61\uff0c\u800c\u975e Node.js \u7684 <code>IncomingMessage<\/code>\u3002<\/li>\n<li>\u6587\u4ef6\u7cfb\u7edf API \u7565\u6709\u4e0d\u540c\uff0c\u4f8b\u5982 <code>Bun.file()<\/code> \u8fd4\u56de <code>BunFile<\/code> \u5bf9\u8c61\u3002<\/li>\n<\/ul>\n<h3>\u6700\u4f73\u5b9e\u8df5<\/h3>\n<ul>\n<li>\u4f7f\u7528 <code>bun --watch<\/code> \u5b9e\u73b0\u70ed\u91cd\u8f7d\u3002<\/li>\n<li>\u5728 <code>package.json<\/code> \u4e2d\u5b9a\u4e49\u811a\u672c\uff0c\u5982 <code>\"start\": \"bun run server.ts\"<\/code>\u3002<\/li>\n<li>\u5229\u7528 <code>Bun.env<\/code> \u8bbf\u95ee\u73af\u5883\u53d8\u91cf\u3002<\/li>\n<\/ul>\n<p>&#8212;<\/p>\n<h2>9. \u603b\u7ed3\u4e0e\u4e0b\u4e00\u6b65<\/h2>\n<p>Bun \u662f\u4e00\u4e2a\u4ee4\u4eba\u5174\u594b\u7684\u8fd0\u884c\u65f6\uff0c\u5b83\u901a\u8fc7\u96c6\u6210\u5de5\u5177\u94fe\u548c\u6781\u81f4\u7684\u6027\u80fd\uff0c\u4e3a JavaScript \u5f00\u53d1\u5e26\u6765\u4e86\u65b0\u7684\u53ef\u80fd\u3002\u672c\u6587\u4ecb\u7ecd\u4e86\u5b89\u88c5\u3001\u5305\u7ba1\u7406\u3001HTTP \u670d\u52a1\u3001\u6d4b\u8bd5\u3001\u6253\u5305\u7b49\u6838\u5fc3\u529f\u80fd\uff0c\u5e76\u7ed9\u51fa\u4e86\u4e00\u4e2a\u5b8c\u6574\u7684 REST API \u793a\u4f8b\u3002<\/p>\n<p><strong>\u4e0b\u4e00\u6b65\u5b66\u4e60\u65b9\u5411<\/strong>\uff1a<\/p>\n<ul>\n<li>\u63a2\u7d22 Elysia \u6846\u67b6\u6784\u5efa\u66f4\u590d\u6742\u7684\u5e94\u7528\u3002<\/li>\n<li>\u4f7f\u7528 Bun \u7684 SQLite \u9a71\u52a8\u8fdb\u884c\u6570\u636e\u6301\u4e45\u5316\u3002<\/li>\n<li>\u4e86\u89e3 Bun \u7684\u63d2\u4ef6\u7cfb\u7edf\u4e0e FFI\u3002<\/li>\n<\/ul>\n<p>Bun \u4ecd\u5728\u5feb\u901f\u53d1\u5c55\uff0c\u5efa\u8bae\u5173\u6ce8\u5b98\u65b9\u535a\u5ba2\u548c GitHub \u4ed3\u5e93\uff0c\u53ca\u65f6\u83b7\u53d6\u6700\u65b0\u52a8\u6001\u3002<\/p>\n<p>&#8212;<\/p>\n<p><strong>\u5ef6\u4f38\u9605\u8bfb<\/strong>\uff1a<\/p>\n<ul>\n<li><a href=\"https:\/\/bun.sh\/docs\">Bun \u5b98\u65b9\u6587\u6863<\/a><\/li>\n<li><a href=\"https:\/\/elysiajs.com\/\">Elysia \u6846\u67b6<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/oven-sh\/bun\">Bun GitHub \u4ed3\u5e93<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Bun \u662f\u4e00\u4e2a\u65b0\u5174\u7684 JavaScript \u8fd0\u884c\u65f6\uff0c\u96c6\u6210\u4e86\u5305\u7ba1\u7406\u3001\u6253\u5305\u3001\u6d4b\u8bd5\u7b49\u529f\u80fd\u3002\u672c\u6587\u5c06\u5e26\u4f60\u5feb\u901f\u4e0a\u624b Bun\uff0c\u901a\u8fc7\u5b9e\u6218\u793a\u4f8b\u63a2\u7d22\u5176\u6838\u5fc3\u7279\u6027\u4e0e\u751f\u6001\uff0c\u5e76\u5206\u4eab\u6027\u80fd\u4f18\u5316\u4e0e\u8e29\u5751\u7ecf\u9a8c\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4],"tags":[189,37,5,40,220,190],"class_list":["post-258","post","type-post","status-publish","format-standard","hentry","category-3","category-4","tag-bun","tag-javascript","tag-node-js","tag-typescript","tag-220","tag-190"],"_links":{"self":[{"href":"https:\/\/yykcj.com\/index.php?rest_route=\/wp\/v2\/posts\/258","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yykcj.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yykcj.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yykcj.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yykcj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=258"}],"version-history":[{"count":0,"href":"https:\/\/yykcj.com\/index.php?rest_route=\/wp\/v2\/posts\/258\/revisions"}],"wp:attachment":[{"href":"https:\/\/yykcj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yykcj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yykcj.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}