{"id":3202,"date":"2023-04-24T18:50:22","date_gmt":"2023-04-24T11:50:22","guid":{"rendered":"https:\/\/www.marketenterprise.vn\/blog\/?p=3202"},"modified":"2023-04-24T19:46:35","modified_gmt":"2023-04-24T12:46:35","slug":"prisma-ho-tro-phat-trien-phan-2","status":"publish","type":"post","link":"https:\/\/www.marketenterprise.vn\/blog\/prisma-ho-tro-phat-trien-phan-2.html","title":{"rendered":"Prisma: Th\u01b0 vi\u1ec7n h\u1ed7 tr\u1ee3 ph\u00e1t tri\u1ec3n \u1ee9ng d\u1ee5ng v\u1edbi c\u01a1 s\u1edf d\u1eef li\u1ec7u &#8211; Ph\u1ea7n 2"},"content":{"rendered":"<h2><span style=\"font-weight: 400;\">B\u01b0\u1edbc 1: T\u1ea1o m\u1ed9t \u1ee9ng d\u1ee5ng Next.js m\u1edbi v\u00e0 c\u00e0i \u0111\u1eb7t c\u00e1c g\u00f3i ph\u1ee5 thu\u1ed9c<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">C\u00f3 th\u1ec3 s\u1eed d\u1ee5ng create-next-app \u0111\u1ec3 t\u1ea1o m\u1ed9t \u1ee9ng d\u1ee5ng Next.js m\u1edbi v\u1edbi l\u1ec7nh:<\/span><br \/>\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">$ npx create-next-app my-app<\/code><\/p>\n<p><span style=\"font-weight: 400;\">H\u00e3y ch\u1ecdn \u201cYes\u201d cho c\u00e1c tu\u1ef3 ch\u1ecdn khi ch\u1ea1y l\u1ec7nh \u201c<\/span><span style=\"font-weight: 400;\">npx create-next-app my-app<\/span><span style=\"font-weight: 400;\">\u201d. Sau \u0111\u00f3 h\u00e3y v\u00e0o th\u01b0 m\u1ee5c \u201cmy-app\u201d v\u1eeba \u0111\u01b0\u1ee3c t\u1ea1o b\u1eb1ng l\u1ec7nh:<\/span><br \/>\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">$ cd my-app<\/code><br \/>\n<span style=\"font-weight: 400;\"><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Sau \u0111\u00f3, c\u1ea7n c\u00e0i \u0111\u1eb7t c\u00e1c g\u00f3i ph\u1ee5 thu\u1ed9c cho \u1ee9ng d\u1ee5ng, bao g\u1ed3m prisma v\u00e0 @prisma\/client:<\/span><br \/>\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">$ npm install prisma @prisma\/client<\/code><\/p>\n<p><span style=\"font-weight: 400;\">C\u1ea7n kh\u1edfi t\u1ea1o prisma v\u1edbi prisma cli \u0111\u1ec3 c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng prisma:<\/span><br \/>\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">$ npx prisma init<\/code><\/p>\n<h2><span style=\"font-weight: 400;\">B\u01b0\u1edbc 2: Ch\u1ec9nh s\u1eeda file schema.prisma \u0111\u1ec3 \u0111\u1ecbnh ngh\u0129a data model<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">&#8211;\u00a0 Trong th\u01b0 m\u1ee5c prisma trong th\u01b0 m\u1ee5c g\u1ed1c c\u1ee7a \u1ee9ng d\u1ee5ng (my-app),h\u00e3y ch\u1ec9nh s\u1eeda file schema.prisma b\u00ean trong \u0111\u00f3.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211;\u00a0 File schema.prisma l\u00e0 n\u01a1i \u0111\u1ecbnh ngh\u0129a c\u00e1c data model, c\u00e1c lo\u1ea1i d\u1eef li\u1ec7u v\u00e0 c\u00e1c quan h\u1ec7 gi\u1eefa ch\u00fang.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211;\u00a0 B\u1ea1n c\u0169ng c\u1ea7n ch\u1ec9 \u0111\u1ecbnh 1 database v\u00e0 binaryTargets cho prisma client trong file schema.prisma.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211;\u00a0 V\u00ed d\u1ee5, n\u1ebfu mu\u1ed1n s\u1eed d\u1ee5ng SQLite l\u00e0m database, c\u00f3 th\u1ec3 vi\u1ebft l\u1ea1i file \u201c&#8230;\/my-app\/prisma\/schema.prisma\u201d nh\u01b0 sau:<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">datasource db {\r\n  provider = \"sqlite\"\r\n  url      = \"file:.\/dev.db\"\r\n}\r\n\r\ngenerator client {\r\n  provider = \"prisma-client-js\"\r\n  binaryTargets = [\"native\", \"linux-musl\"]\r\n}\r\n\r\nmodel Post {\r\n  id        Int      @id @default(autoincrement())\r\n  title     String\r\n  content   String?\r\n  published Boolean  @default(false)\r\n  author    User     @relation(fields: [authorId], references: [id])\r\n  authorId  Int\r\n}\r\n\r\nmodel User {\r\n  id    Int     @id @default(autoincrement())\r\n  email String  @unique\r\n  name  String?\r\n  posts Post[]\r\n}\r\n<\/pre>\n<h2><span style=\"font-weight: 400;\">B\u01b0\u1edbc 3: Ch\u1ea1y l\u1ec7nh prisma migrate \u0111\u1ec3 t\u1ea1o database t\u1eeb file schema.prisma<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">&#8211;\u00a0 Sau khi \u0111\u00e3 \u0111\u1ecbnh ngh\u0129a xong c\u00e1c data model trong file schema.prisma, h\u00e3y ch\u1ea1y l\u1ec7nh prisma migrate \u0111\u1ec3 t\u1ea1o database t\u1eeb file schema.prisma.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211;\u00a0 L\u1ec7nh prisma migrate s\u1ebd t\u1ea1o ra c\u00e1c file migration trong th\u01b0 m\u1ee5c prisma\/migrations v\u00e0 \u00e1p d\u1ee5ng ch\u00fang v\u00e0o database.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">V\u00ed d\u1ee5, c\u00f3 th\u1ec3 ch\u1ea1y l\u1ec7nh sau:<\/span><br \/>\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">$ npx prisma migrate dev --name init<\/code><\/p>\n<h2><span style=\"font-weight: 400;\">B\u01b0\u1edbc 4: S\u1eed d\u1ee5ng prisma client \u0111\u1ec3 truy v\u1ea5n v\u00e0 thao t\u00e1c v\u1edbi database trong project NextJS v\u1eeba m\u1edbi t\u1ea1o<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">&#8211;\u00a0 Sau khi t\u1ea1o database t\u1eeb file schema.prisma, c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng prisma client \u0111\u1ec3 truy v\u1ea5n v\u00e0 thao t\u00e1c v\u1edbi database trong project Next.js.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211;\u00a0 Prisma client l\u00e0 m\u1ed9t th\u01b0 vi\u1ec7n JavaScript \u0111\u01b0\u1ee3c sinh ra t\u1ef1 \u0111\u1ed9ng t\u1eeb file schema.prisma. N\u00f3 cung c\u1ea5p m\u1ed9t API d\u1ec5 s\u1eed d\u1ee5ng v\u00e0 an to\u00e0n \u0111\u1ec3 truy c\u1eadp database.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211;\u00a0 \u0110\u1ec3 s\u1eed d\u1ee5ng prisma client, c\u1ea7n import n\u00f3 v\u00e0o v\u00e0 kh\u1edfi t\u1ea1o m\u1ed9t \u0111\u1ed1i t\u01b0\u1ee3ng prisma nh\u01b0 trong v\u00ed d\u1ee5. Trong file \u201c&#8230;\/my-app\/src\/app\/api\/hello\/route.ts\u201d thay \u0111\u1ed5i code l\u1ea1i \u0111\u1ec3 t\u1ea1o m\u1ed9t user m\u1edbi v\u1edbi c\u00e1c post c\u1ee7a h\u1ecd nh\u01b0 sau:<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">import { PrismaClient } from '@prisma\/client'\r\n\r\nexport async function GET(request: Request) {\r\n  return new Response('Hello, Next.js at http:\/\/localhost:3000\/ and Prisma at http:\/\/localhost:5555\/')\r\n}\r\n\r\nconst prisma = new PrismaClient()\r\n\r\nasync function createUser() {\r\n  const user = await prisma.user.create({\r\n    data: {\r\n      name: 'Alice',\r\n      email: 'alice@example.com',\r\n      posts: {\r\n        create: [\r\n          {\r\n            title: 'Hello World',\r\n            content: 'This is my first post',\r\n            published: true,\r\n          },\r\n          {\r\n            title: 'Next.js Rocks',\r\n            content: 'I love using Next.js and Prisma',\r\n            published: false,\r\n          },\r\n        ],\r\n      },\r\n    },\r\n  })\r\n}\r\ncreateUser()\r\n\r\nasync function getUsers() {\r\n  const users = await prisma.user.findMany({\r\n    include: {\r\n      posts: {\r\n        where: {\r\n          published: true,\r\n        },\r\n      },\r\n    },\r\n  })\r\n  console.log(users)\r\n}\r\n\r\ngetUsers()\r\n<\/pre>\n<p><span style=\"font-weight: 400;\">&#8211;\u00a0 H\u00e3y xem th\u00eam c\u00e1c v\u00ed d\u1ee5 v\u00e0 t\u00e0i li\u1ec7u v\u1ec1 c\u00e1ch s\u1eed d\u1ee5ng prisma client t\u1ea1i \u0111\u00e2y: <\/span><a href=\"https:\/\/www.prisma.io\/docs\/concepts\/components\/prisma-client\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">https:\/\/www.prisma.io\/docs\/concepts\/components\/prisma-client<\/span><\/a><\/p>\n<p>&#8211;\u00a0 <span style=\"font-weight: 400;\">Thay \u0111\u1ed5i giao di\u1ec7n m\u1eb7c \u0111\u1ecbnh \u1edf file \u201c&#8230;\/my-app\/src\/app\/page.tsx\u201d nh\u01b0 sau:<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">import Image from 'next\/image'\r\n\r\nexport default function Home() {\r\n  return (\r\n    &lt;main className=\"flex min-h-screen flex-col items-center justify-between p-24\"&gt;      \r\n      &lt;div className=\"relative flex place-items-center\"&gt;\r\n        &lt;Image\r\n          className=\"relative dark:invert\"\r\n          src=\"\/next.svg\" alt=\"Next.js Logo\"\r\n          width={180} height={37} priority\r\n        \/&gt;\r\n      &lt;\/div&gt;\r\n      &lt;div className=\"text-center\"&gt; \r\n        &lt;a href='http:\/\/localhost:3000\/api\/hello'&gt;\r\n          Test Prisma\r\n        &lt;\/a&gt;\r\n      &lt;\/div&gt;\r\n    &lt;\/main&gt;\r\n  )\r\n}\r\n<\/pre>\n<p>&#8211;\u00a0 B\u00e2y gi\u1edd, \u0111\u00e3 s\u1eb5n s\u00e0ng \u0111\u1ec3 ch\u1ea1y d\u1ef1 \u00e1n Next.js \u0111\u01a1n gi\u1ea3n n\u00e0y. H\u00e3y d\u00f9ng c\u00e2u l\u1ec7nh sau \u0111\u1ec3 serve \u1ee9ng d\u1ee5ng v\u1eeba t\u1ea1o.<br \/>\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">$ npm run dev<\/code><\/p>\n<p>&#8211;\u00a0 H\u00e3y m\u1edf tr\u00ecnh duy\u1ec7t \u1edf http:\/\/localhost:3000\/ \u0111\u1ec3 xem th\u00e0nh qu\u1ea3.<\/p>\n<p><span style=\"font-weight: 400;\">&#8211;\u00a0 Click v\u00e0o button \u201cTest Prisma\u201d \u0111\u1ec3 ghi th\u00f4ng tin \u0111\u00e3 \u0111\u01b0\u1ee3c khai b\u00e1o \u1edf <\/span><span style=\"font-weight: 400;\">PrismaClient<\/span><span style=\"font-weight: 400;\"> v\u00e0o database.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211;\u00a0 B\u1ea1n c\u00f3 th\u1ec3 ch\u1ea1y l\u1ec7nh prisma studio \u0111\u1ec3 xem v\u00e0 ch\u1ec9nh s\u1eeda d\u1eef li\u1ec7u trong database th\u00f4ng qua giao di\u1ec7n web.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211;\u00a0 \u0110\u1ec3 xem k\u1ebft qu\u1ea3, h\u00e3y ch\u1ea1y l\u1ec7nh kh\u1edfi t\u1ea1o Prisma studio sau:<\/span><br \/>\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">$ npx prisma studio<\/code><\/p>\n<p><span style=\"font-weight: 400;\">&#8211;\u00a0 M\u1edf Prisma studio \u1edf http:\/\/localhost:5555\/ \u0111\u1ec3 xem v\u00e0 ch\u1ec9nh s\u1eeda d\u1eef li\u1ec7u trong database th\u00f4ng qua giao di\u1ec7n web<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mevn-public.s3-ap-southeast-1.amazonaws.com\/marketenterprise.vn\/wp-images\/2023\/04\/18181412\/image11-1024x501.png\" alt=\"Prisma Studio\" width=\"1024\" class=\"aligncenter wp-image-3200 size-large\" height=\"501\" srcset=\"https:\/\/mevn-public.s3-ap-southeast-1.amazonaws.com\/marketenterprise.vn\/wp-images\/2023\/04\/18181412\/image11-1024x501.png 1024w, https:\/\/mevn-public.s3-ap-southeast-1.amazonaws.com\/marketenterprise.vn\/wp-images\/2023\/04\/18181412\/image11-300x147.png 300w, https:\/\/mevn-public.s3-ap-southeast-1.amazonaws.com\/marketenterprise.vn\/wp-images\/2023\/04\/18181412\/image11-768x376.png 768w, https:\/\/mevn-public.s3-ap-southeast-1.amazonaws.com\/marketenterprise.vn\/wp-images\/2023\/04\/18181412\/image11.png 1276w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<h2><span style=\"font-weight: 400;\">K\u1ebft lu\u1eadn<\/span><\/h2>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Trong b\u00e0i blog n\u00e0y, ch\u00fang ta \u0111\u00e3 h\u1ecdc c\u00e1ch s\u1eed d\u1ee5ng Next.js v\u00e0 prisma \u0111\u1ec3 x\u00e2y d\u1ef1ng v\u00e0 tri\u1ec3n khai m\u1ed9t \u1ee9ng d\u1ee5ng web hi\u1ec7n \u0111\u1ea1i v\u00e0 hi\u1ec7u qu\u1ea3.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Prisma l\u00e0 m\u1ed9t th\u01b0 vi\u1ec7n cho ph\u00e9p k\u1ebft n\u1ed1i v\u00e0 truy v\u1ea5n database m\u1ed9t c\u00e1ch d\u1ec5 d\u00e0ng v\u00e0 an to\u00e0n. N\u00f3 cung c\u1ea5p m\u1ed9t API tr\u1ef1c quan v\u00e0 linh ho\u1ea1t \u0111\u1ec3 th\u1ef1c hi\u1ec7n c\u00e1c thao t\u00e1c CRUD (t\u1ea1o, \u0111\u1ecdc, c\u1eadp nh\u1eadt v\u00e0 x\u00f3a) v\u1edbi database.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Ch\u00fang ta \u0111\u00e3 h\u01b0\u1edbng d\u1eabn t\u1eebng b\u01b0\u1edbc c\u00e1ch t\u1ea1o m\u1ed9t \u1ee9ng d\u1ee5ng Next.js m\u1edbi, c\u00e0i \u0111\u1eb7t c\u00e1c g\u00f3i ph\u1ee5 thu\u1ed9c, \u0111\u1ecbnh ngh\u0129a data model, t\u1ea1o database, truy v\u1ea5n database, ki\u1ec3m tra v\u00e0 c\u1ea3i thi\u1ec7n \u1ee9ng d\u1ee5ng c\u1ee7a ch\u00fang ta.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">B\u1ea1n \u0111\u00e3 h\u1ecdc xong c\u00e1ch x\u00e2y d\u1ef1ng v\u00e0 tri\u1ec3n khai \u1ee9ng d\u1ee5ng web v\u1edbi Next.js v\u00e0 Prisma. H\u00e3y b\u1eaft \u0111\u1ea7u \u00e1p d\u1ee5ng nh\u1eefng ki\u1ebfn th\u1ee9c n\u00e0y v\u00e0o \u1ee9ng d\u1ee5ng ngay h\u00f4m nay. N\u1ebfu quan t\u00e2m \u0111\u1ebfn Prisma v\u00e0 mu\u1ed1n t\u00ecm hi\u1ec3u th\u00eam v\u1ec1 n\u00f3, h\u00e3y truy c\u1eadp v\u00e0o trang web ch\u00ednh th\u1ee9c c\u1ee7a Prisma t\u1ea1i <\/span><a href=\"https:\/\/www.prisma.io\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">\u0111\u00e2y<\/span><\/a><span style=\"font-weight: 400;\"> (<a href=\"https:\/\/www.prisma.io\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.prisma.io\/<\/a>). Ho\u1eb7c c\u0169ng c\u00f3 th\u1ec3 xem c\u00e1c t\u00e0i li\u1ec7u, c\u00e1c v\u00ed d\u1ee5 v\u00e0 c\u00e1c h\u01b0\u1edbng d\u1eabn v\u1ec1 c\u00e1ch s\u1eed d\u1ee5ng Prisma t\u1ea1i <\/span><a href=\"https:\/\/www.prisma.io\/docs\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">\u0111\u00e2y<\/span><\/a><span style=\"font-weight: 400;\"> (<a href=\"https:\/\/www.prisma.io\/docs\" target=\"_blank\" rel=\"noopener\">https:\/\/www.prisma.io\/docs<\/a>).<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Hy v\u1ecdng b\u00e0i vi\u1ebft n\u00e0y \u0111\u00e3 gi\u00fap cung c\u1ea5p m\u1ed9t c\u00e1i nh\u00ecn t\u1ed5ng quan v\u1ec1 Prisma v\u00e0 nh\u1eefng \u01b0u nh\u01b0\u1ee3c \u0111i\u1ec3m c\u1ee7a n\u00f3. N\u1ebfu c\u00f3 b\u1ea5t k\u1ef3 c\u00e2u h\u1ecfi hay g\u00f3p \u00fd n\u00e0o, xin vui l\u00f2ng \u0111\u1ec3 l\u1ea1i b\u00ecnh lu\u1eadn b\u00ean d\u01b0\u1edbi. C\u1ea3m \u01a1n b\u1ea1n \u0111\u00e3 \u0111\u1ecdc b\u00e0i vi\u1ebft n\u00e0y v\u00e0 ch\u00fac b\u1ea1n th\u00e0nh c\u00f4ng trong vi\u1ec7c ph\u00e1t tri\u1ec3n \u1ee9ng d\u1ee5ng v\u1edbi c\u01a1 s\u1edf d\u1eef li\u1ec7u.<\/span><\/p>\n<p>Ph\u1ea7n 1: <a href=\"https:\/\/www.marketenterprise.vn\/blog\/prisma-ho-tro-phat-trien-phan-1.html\">https:\/\/www.marketenterprise.vn\/blog\/prisma-ho-tro-phat-trien-phan-1.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>C\u00e1ch t\u1ea1o m\u1ed9t \u1ee9ng d\u1ee5ng Next.js m\u1edbi, c\u00e0i \u0111\u1eb7t Prisma v\u00e0 c\u00e1c g\u00f3i ph\u1ee5 thu\u1ed9c, \u0111\u1ecbnh ngh\u0129a data model, t\u1ea1o database, truy v\u1ea5n database, ki\u1ec3m tra v\u00e0 c\u1ea3i thi\u1ec7n \u1ee9ng d\u1ee5ng.<\/p>\n","protected":false},"author":45,"featured_media":3192,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[2,139,146,102],"class_list":["post-3202","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","tag-mevn","tag-nextjs","tag-prisma","tag-typescript"],"_links":{"self":[{"href":"https:\/\/www.marketenterprise.vn\/blog\/wp-json\/wp\/v2\/posts\/3202","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.marketenterprise.vn\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.marketenterprise.vn\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.marketenterprise.vn\/blog\/wp-json\/wp\/v2\/users\/45"}],"replies":[{"embeddable":true,"href":"https:\/\/www.marketenterprise.vn\/blog\/wp-json\/wp\/v2\/comments?post=3202"}],"version-history":[{"count":0,"href":"https:\/\/www.marketenterprise.vn\/blog\/wp-json\/wp\/v2\/posts\/3202\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.marketenterprise.vn\/blog\/wp-json\/wp\/v2\/media\/3192"}],"wp:attachment":[{"href":"https:\/\/www.marketenterprise.vn\/blog\/wp-json\/wp\/v2\/media?parent=3202"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.marketenterprise.vn\/blog\/wp-json\/wp\/v2\/categories?post=3202"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.marketenterprise.vn\/blog\/wp-json\/wp\/v2\/tags?post=3202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}