From 26a606a1bbb2b5e5de3f23d8f915e03ee1bc94e3 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Tue, 1 Aug 2023 10:14:59 +0300 Subject: [PATCH] docs: fixes to create endpoint documentation (#4650) --- docs/content/development/endpoints/create.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/development/endpoints/create.md b/docs/content/development/endpoints/create.md index b89d110871..e7bede18a7 100644 --- a/docs/content/development/endpoints/create.md +++ b/docs/content/development/endpoints/create.md @@ -9,9 +9,9 @@ In this document, you’ll learn how to create endpoints in Medusa. ## Overview -Custom endpoints are created under the `src/api` directory in your Medusa Backend. They're defined in a TypeScript or JavaScript file named `index` (for example, `index.ts`). This file should export a function that returns an Express router +Custom endpoints are created under the `src/api` directory in your Medusa Backend. They're defined in a TypeScript or JavaScript file named `index` (for example, `index.ts`). This file should export a function that returns an Express router or an array of routes and middlewares. -They're then transpiled into the `/dist/api` directory to be consumed. +To consume the custom endpoints in your Medusa backend, you must transpile them with the `build` command before starting your backend. ---