docs: added dividers + see also section (#2899)

This commit is contained in:
Shahed Nasser
2022-12-26 15:52:08 +02:00
committed by GitHub
parent b0e5769e27
commit b0ebfd6bcf
100 changed files with 1047 additions and 291 deletions

View File

@@ -6,12 +6,16 @@ In this document, youll learn what configurations you can add to your Medusa
This document assumes you already followed along with the [“Set up your development environment” documentation](../tutorial/0-set-up-your-development-environment.mdx) and have [installed a Medusa server](../quickstart/quick-start.mdx#create-a-medusa-server).
---
## Medusa Configurations File
The configurations for your Medusa server are in `medusa-config.js`. This includes database, Redis, and plugin configurations, among other configurations.
Some of the configurations mentioned in this document are already defined in `medusa-config.js` with default values. Its important that you know what these configurations are used for and how to set them.
---
## Environment Variables
In your configurations, youll often use environment variables. For example, when using API keys or setting your database URL.
@@ -24,6 +28,8 @@ This change in how environment variables are loaded was introduced in version 1.
:::
---
## Database Configuration
Medusa supports two database types: SQLite and PostgreSQL.
@@ -110,6 +116,8 @@ module.exports = {
};
```
---
## Redis
Medusa uses Redis to handle the event queue, among other usages. You need to set Redis URL in the configurations:
@@ -147,6 +155,8 @@ You can learn more about Subscribers and events in the [Subscriber documentation
:::
---
## JWT Secret
Medusa uses JSON Web Token (JWT) to handle user authentication. To set the JWT secret:
@@ -176,6 +186,8 @@ In a development environment, if this option is not set the default secret is
:::
---
## Cookie Secret
This configuration is used to sign the session ID cookie. To set the cookie secret:
@@ -205,6 +217,8 @@ In a development environment, if this option is not set the default secret is
:::
---
## CORS Configurations
Medusa uses Cross-Origin Resource Sharing (CORS) to only allow specific origins to access the server.
@@ -276,6 +290,8 @@ Make sure that the URL is without a backslash at the end. For example, you shoul
:::
---
## Plugins
On your Medusa server, you can use Plugins to add custom features or integrate third-party services. For example, installing a plugin to use Stripe as a payment provider.
@@ -330,8 +346,10 @@ It is recommended to use environment variables to store values of options instea
:::
## Whats Next
---
- Check out the [Next.js](../starters/nextjs-medusa-starter.mdx) and [Gatsby](../starters/gatsby-medusa-starter.mdx) starter storefronts.
- Install the [Medusa admin](../admin/quickstart.mdx).
- Learn about [deploying the Medusa server](../deployments/server/index.mdx).
## See Also
- Check out the [Next.js](../starters/nextjs-medusa-starter.mdx) and [Gatsby](../starters/gatsby-medusa-starter.mdx) starter storefronts
- [Install the Medusa admin](../admin/quickstart.mdx)
- [Deploy the Medusa server](../deployments/server/index.mdx)

View File

@@ -15,6 +15,8 @@ However, if youre interested in using Medusas starters for the three compo
When you run the `create-medusa-app` command, youll install a Medusa server, a Medusa admin, and optionally a storefront at the same time.
---
## How to Create a Medusa Project
In your terminal, run the following command:
@@ -103,6 +105,8 @@ yarn start
The commands will differ based on your choices in previous prompts.
---
## Project Directory Structure
Inside the root project directory which was specified at the beginning of the installation process youll find the following directory structure:
@@ -114,8 +118,10 @@ Inside the root project directory which was specified at the beginning of the in
/admin // Medusa admin panel
```
---
## Whats Next
- Learn how to [deploy the Medusa server](../deployments/server/index.mdx).
- Learn how to [deploy the Medusa admin](../deployments/admin/index.mdx).
- Learn how to [deploy the storefront](../deployments/storefront/index.mdx).
- [Deploy the Medusa server](../deployments/server/index.mdx)
- [Deploy the Medusa admin](../deployments/admin/index.mdx)
- [Deploy the storefront](../deployments/storefront/index.mdx)

View File

@@ -14,6 +14,8 @@ Whether you want to implement something differently, introduce a new future as p
All the packages are part of a [Yarn workspace](https://classic.yarnpkg.com/lang/en/docs/workspaces/). So, when you run a command in the root of the project, such as `yarn build`, it goes through all registered packages in the workspace under the `packages` directory and runs the `build` command in each of those packages.
---
## Prerequisites
### Yarn
@@ -51,6 +53,8 @@ In the directory of your forked GitHub repository, run the following command to
medusa-dev --set-path-to-repo `pwd`
```
---
## Run Tests in the Repository
In this section, youll learn how to run tests in the Medusa repository. This is helpful after you customize any of Medusas packages and want to make sure everything is still working as expected.
@@ -94,6 +98,8 @@ To run the plugin integration tests, run the following command in the root direc
yarn test:integration:plugins
```
---
## Test in a Local Server
Using Medusas dev CLI tool, you can test any changes you make to Medusas packages in a local server installation. This eliminates the need to publish these packages on NPM publicly to be able to use them.
@@ -146,7 +152,9 @@ medusa-dev -q
medusa-dev --packages @medusajs/medusa-cli medusa-file-minio
```
## Whats Next
---
- Check out our [contribution guidelines](https://github.com/medusajs/medusa/blob/master/CONTRIBUTING.md).
- Learn how to [create a plugin](../advanced/backend/plugins/create.md).
## See Also
- [Create a Plugin](../advanced/backend/plugins/create.md)
- [Contribution Guidelines](https://github.com/medusajs/medusa/blob/master/CONTRIBUTING.md)