docs: shorten npx commands (#4652)
This commit is contained in:
@@ -360,7 +360,7 @@ The `productService` has a `count` method that returns a Promise. This Promi
|
||||
|
||||
## Building Files
|
||||
|
||||
Custom endpoints must be transpiled and moved to the `dist` directory before you can start consuming them. When you run your backend using either the `medusa develop` or `npx @medusajs/medusa-cli develop` commands, it watches the files under `src` for any changes, then triggers the `build` command and restarts the server.
|
||||
Custom endpoints must be transpiled and moved to the `dist` directory before you can start consuming them. When you run your backend using either the `medusa develop` or `npx medusa develop` commands, it watches the files under `src` for any changes, then triggers the `build` command and restarts the server.
|
||||
|
||||
The build isn't triggered though when the backend first starts running. So, make sure to run the `build` command before starting the backend:
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ npm run build
|
||||
Then, run your backend with the following command:
|
||||
|
||||
```bash npm2yarn
|
||||
npx @medusajs/medusa-cli develop
|
||||
npx medusa develop
|
||||
```
|
||||
|
||||
If you try accessing the endpoints you added the middleware to, you should see your implementation working as expected.
|
||||
|
||||
@@ -77,7 +77,7 @@ To test out your extended validator, build and start your Medusa backend:
|
||||
|
||||
```bash npm2yarn
|
||||
npm run build
|
||||
npx @medusajs/medusa-cli develop
|
||||
npx medusa develop
|
||||
```
|
||||
|
||||
Then, send a request to the endpoint you extended passing it your custom fields. To test out the example in this guide, send an [authenticated request](/api/admin#section/Authentication) to the [Create Product endpoint](https://docs.medusajs.com/api/admin#tag/Products/operation/PostProducts) and pass it the `custom_field` body parameter. The request should execute with no errors.
|
||||
|
||||
Reference in New Issue
Block a user