docs: updated Docusaurus + fix recurring error (#1244)

This commit is contained in:
Shahed Nasser
2022-04-08 11:16:22 +02:00
committed by GitHub
parent 6fbb18e3a7
commit 4321af8db6
11 changed files with 1161 additions and 3060 deletions
@@ -36,7 +36,11 @@ This exports a function that returns an Express router. In that function, you ca
Now, if you run your server and send a request to `/admin/hello`, you will receive a JSON response message.
> Custom endpoints are compiled into the `dist` directory of your Backend when you run your server using `medusa develop`, while its running, and when you run `npm run build`.
:::note
Custom endpoints are compiled into the `dist` directory of your Backend when you run your server using `medusa develop`, while its running, and when you run `npm run build`.
:::
## Accessing Endpoints from Admin
@@ -36,7 +36,11 @@ This exports a function that returns an Express router. In that function, you ca
Now, if you run your server and send a request to `/store/hello`, you will receive a JSON response message.
> Custom endpoints are compiled into the `dist` directory of your Backend when you run your server using `medusa develop`, while its running, and when you run `npm run build`.
:::note
Custom endpoints are compiled into the `dist` directory of your Backend when you run your server using `medusa develop`, while its running, and when you run `npm run build`.
:::
## Multiple Endpoints
@@ -0,0 +1,7 @@
# Documentation Error
If you have installed the dependencies in the root of this repository (i.e., if you have a `node_modules` directory at the root of this repository), this will cause an error when running this documentation website. This is because the content resides in `docs/content` and when that content is being imported from there, a mix up can happen between the dependencies which will cause an `invalid hook call` error.
For that reason, we added a `clean-node-modules` script that deletes the `node_modules` directory, and we call that script before the `start` and `build` scripts are ran.
So, everytime you run these 2 scripts, the `node_modules` directory at the root will be deleted.