chore: reorganize docs apps (#7228)

* reorganize docs apps

* add README

* fix directory

* add condition for old docs
This commit is contained in:
Shahed Nasser
2024-05-03 17:36:38 +03:00
committed by GitHub
parent 224ebb2154
commit 4fe28f5a95
6187 changed files with 601447 additions and 598226 deletions
@@ -0,0 +1,21 @@
If you are experiencing connection issues when trying to access your Medusa backend from a storefront or the admin dashboard, it is most likely due to Cross-Origin Resource Sharing (CORS) issues.
You might see a log in your browser console, that looks like this:
![CORS error log](https://res.cloudinary.com/dza7lstvk/image/upload/v1668003322/Medusa%20Docs/Other/jnHK115_udgf2n.png)
In your `medusa-config.js` , you should ensure that you've configured your CORS settings correctly. By default, the Medusa starter runs on port `9000`, Medusa Admin runs on port `7001`, and the storefront starters run on port `8000`.
The default configuration uses the following CORS settings:
```js title="medusa-config.js"
// CORS when consuming Medusa from admin
const ADMIN_CORS = process.env.ADMIN_CORS ||
"http://localhost:7000,http://localhost:7001"
// CORS to avoid issues when consuming Medusa from a client
const STORE_CORS =
process.env.STORE_CORS || "http://localhost:8000"
```
If you wish to run your storefront or Medusa Admin on other ports, you should update the above settings accordingly.
@@ -0,0 +1,14 @@
When you run your backend you may run to an error similar to the following:
```bash
code: 'EADDRINUSE',
errno: -48,
syscall: 'Listen',
address: '::',
port: 9000
```
This means that there's another process running at port `9000`. You need to either:
- Change the default port used by the Medusa backend. You can do that by setting the `PORT` environment variable to a new port. When you do this, make sure to change the port used in other apps that interact with your Medusa backend, such as in your [admin](../admin/configuration.mdx#build-command-options) or [storefront](../starters/nextjs-medusa-starter.mdx#changing-medusa-backend-url).
- Terminate other processes running on port `9000`.
@@ -0,0 +1,14 @@
If you're using the [S3 Plugin](../../../plugins/storage/s3/page.mdx) and, when you upload an image, you receive the following error on your Medusa backend:
```bash noReport
AccessControlListNotSupported: The bucket does not allow ACLs
```
Try the following:
1. Go to your S3 Bucket, then choose the Permissions tab.
2. Scroll to Object Ownership and click the Edit button.
3. Select ACLs enabled and choose for Object Ownership the radio button Bucket owner preferred.
4. Click the Save Changes.
Try uploading again after making this change. Upload should be successful.