docs: added dividers + see also section (#2899)
This commit is contained in:
@@ -6,12 +6,16 @@ In this document, you’ll 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. It’s important that you know what these configurations are used for and how to set them.
|
||||
|
||||
---
|
||||
|
||||
## Environment Variables
|
||||
|
||||
In your configurations, you’ll 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
|
||||
|
||||
:::
|
||||
|
||||
## What’s 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)
|
||||
|
||||
@@ -15,6 +15,8 @@ However, if you’re interested in using Medusa’s starters for the three compo
|
||||
|
||||
When you run the `create-medusa-app` command, you’ll 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 you’ll 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
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## What’s 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)
|
||||
|
||||
@@ -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, you’ll learn how to run tests in the Medusa repository. This is helpful after you customize any of Medusa’s 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 Medusa’s dev CLI tool, you can test any changes you make to Medusa’s 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
|
||||
```
|
||||
|
||||
## What’s 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)
|
||||
|
||||
Reference in New Issue
Block a user